# Pykka

Pykka is a Python implementation of the actor model. The actor model introduces some simple rules to control the sharing of state and cooperation between execution units, which makes it easier to build concurrent applications.

For details and code examples, see the Pykka documentation.

Pykka is available from PyPI. To install it, run:

    pip install pykka

Pykka works with Python 3.9 or newer.

## Inspiration

Much of the naming of concepts and methods in Pykka is taken from the Akka project which implements actors on the JVM. Though, Pykka does not aim to be a Python port of Akka, and supports far fewer features.

Notably, Pykka does not support the following features:

- Supervision: Linking actors, supervisors, or supervisor groups.

- Remoting: Communicating with actors running on other hosts.

- Routers: Pykka does not come with a set of predefined message routers, though you may make your own actors for routing messages.

## Project resources

- Documentation

- Source code

- Releases

- Issue tracker

- Contributors

- Users

Usage

- Quickstart
  - Rules of the actor model
  - The actor implementations
  - A basic actor
  - Actor proxies
- Examples
  - Plain actor
  - Actor with proxy
  - Multiple cooperating actors
  - Pool of actors sharing work
  - Mopidy music server
- Runtimes
  - Threading
- Testing
  - An example

Reference

- Module
  - `__version__`
- Actors
  - `Actor`
  - `ActorRef`
- Proxies
  - `ActorProxy`
  - `CallableProxy`
  - `traversable()`
- Futures
  - `Future`
  - `get_all()`
- Registry
  - `ActorRegistry`
- Exceptions
  - `ActorDeadError`
  - `Timeout`
- Messages
  - `ProxyCall`
  - `ProxyGetAttr`
  - `ProxySetAttr`
- Logging
  - Log levels
  - Log handlers
  - Recommended setup
- Debug helpers
  - `log_thread_tracebacks()`
  - Deadlock debugging
- Type hints
  - `proxy_field()`
  - `proxy_method()`
  - `ActorMemberMixin`

## License

Pykka is copyright 2010-2025 Stein Magnus Jodal and contributors. Pykka is licensed under the Apache License, Version 2.0.