Registry / workflow / pykka
library4.4.2pypypi✓ verified 88d ago

Pykka is a Python implementation of the actor model, providing concurrency primitives for building distributed and concurrent systems. Version 4.4.2 runs on Python >=3.10. New releases are sporadic.

pip install pykka
INSTALL
IMPORT
SIG · PYKKA
P
pykka
workflowpythonv4.4.2
Install
1.6s avg
Import
61ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v4.4.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.062s · 18MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.060s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Actor
✓ from pykka import Actor
Standard import
ThreadingActor
✓ from pykka import ThreadingActor
Preferred for I/O-bound tasks
ActorRef
✓ from pykka import ActorRef
Reference to an actor instance
ActorRegistry
✓ from pykka import ActorRegistry
Global registry of actors
getattr
✓ from pykka import getattr
✗ from pykka.actor import getattr
getattr moved to top-level since v3

Define an actor class, start it, send a message, and stop.

import pykka class Greeter(pykka.ThreadingActor): def __init__(self, greeting='Hi'): super().__init__() self.greeting = greeting def on_receive(self, message): return f'{self.greeting}, {message}' actor = Greeter.start(greeting='Hello').proxy() print(actor.on_receive('World').get()) # Hello, World actor.stop()
Debug
Known issues
gotchaActors are not threadsafe; avoid sharing mutable state between actors. Use message passing only.
fix
Design actors as isolated units communicating via messages (dicts or immutable objects).
affects: all
gotchaUnlike the standard library, Pykka actors must be stopped explicitly to release resources. ActorRegistry will not clean them up automatically.
fix
Call actor.stop() or use a context manager: with Greeter.start() as actor: ...
affects: >=3.0
breakingIn Pykka 4.x, on_receive must return a value or raise an exception; previously None was allowed and would cause hangs.
fix
Ensure on_receive always returns a value (or call actor.stop() explicitly without a return).
affects: 4.0 - 4.4
gotchaProxy() and get() are blocking. Using them inside an actor's on_receive can cause deadlocks.
fix
Use future.get() only outside actors, or use call() with a callback instead.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pykka'
Pykka not installed or wrong Python environment.
fix
Install with 'pip install pykka' and verify Python version >=3.10.
AttributeError: 'MyActor' object has no attribute 'start'
Attempting to call start() on an instance instead of the class.
fix
Use MyActor.start() (class method) not my_actor.start().
TimeoutError: Actor call timed out after ... seconds
Actor's on_receive never returned a value (or deadlocked).
fix
Ensure every on_receive returns a result. If no result, call actor.stop() and return a default.
Upgrade
Version history
4.4.2latest on PyPI · released Mar 14, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
40 hits · last 30 days
node
34
Anthropic
1
OpenAI (training)
1
Resources
pykka — pip install pykka · libregistry