Durable Actors for Python
Durable actors and typed clients, backed by the Rust runtime.
Quickstart · Reference · Runnable example
Quickstart
Requires Node.js 22.19+, pnpm, Python 3.11+, and uv.
pnpm dlx durable-actors init my-actors --template python
cd my-actors
pnpm install
uv sync
Define src/actors.py. Annotated fields persist; emitted() also broadcasts saved changes.
from durable_actors import Actor, emitted
class Counter(Actor):
count: int = emitted(0)
def increment(self, amount: int = 1) -> int:
self.count += amount
return self.count
pnpm exec durable-actors dev
Call an actor
In another terminal in the same directory, generate the client:
pnpm exec durable-actors generate
Save as client.py and run uv run client.py:
from generated import actors
counter = actors.Counter.get("one")
print(counter.increment())
Use the client in another application
Copy the entire generated package, including its helper modules, into the application. From that application's root, install the client runtime:
uv add durable-actors
This installs the runtime dependencies automatically. The [codegen] extras are only needed to generate or regenerate clients, not to run them.
Subscribe to state
Callbacks receive complete typed snapshots on a background thread. Keep the process running while listening; the context manager closes the subscription.
from generated import actors
counter = actors.Counter.get("one")
with counter.subscribe(lambda state: print(state.count), on_error=print):
counter.increment()
input("Press Enter to stop.\n")
Metadata
Release files for durable-actors 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| durable_actors-0.6.1.tar.gz | 135.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| durable_actors-0.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 186.7 kB
Release files / durable_actors-0.6.1.tar.gz
| Download URL | durable_actors-0.6.1.tar.gz |
|---|---|
| Size | 135.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2de8d0e97fa212fd96d4359585b4a10fce1da3389a4bf2fff7791cc004e6db61
|
|
BLAKE2b-256 checksum How to use checksums |
ff2acf6bdef75f9a89c817325b009742b327be8ecb572d3513fd4212aa28a5a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / durable_actors-0.6.1-py3-none-any.whl
| Download URL | durable_actors-0.6.1-py3-none-any.whl |
|---|---|
| Size | 51.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d0e108534f125f242f7a4c685059ed66f2b796d53d939a6218ad12b855be52d
|
|
BLAKE2b-256 checksum How to use checksums |
614fc52f1fb7c21fdc851f2a779bf2117ed7d0030d9dacd61d307c217a268c8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency log