Skip to main content

Durable Actors for Python

Durable actors and typed clients, backed by the Rust runtime.

Quickstart · Reference · Runnable example

Quickstart

Requires Python 3.11+ and uv. The CLI, SDK, and native runtime are installed as Python packages.

Create a project anywhere. uv installs the SDK, CLI, and matching native runtime wheel from PyPI.

uvx --from 'durable-actors[cli]' durable-actors init my-actors
cd my-actors

Define src/actors.py. Every instance field must use persisted() or ephemeral(). Persisted fields are stored in SQLite. Litestream is built into the runtime; local development persists to the filesystem. Wrap persisted fields with emitted() to broadcast saved changes.

from durable_actors import Actor, emitted, persisted

class Counter(Actor):
    count: int = emitted(persisted(0))

    def increment(self, amount: int = 1) -> int:
        self.count += amount
        return self.count
uv run durable-actors dev

Call an actor

In another terminal in the same directory, generate the client:

uv run 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.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for durable-actors 0.8.0
File Size Uploaded
durable_actors-0.8.0.tar.gz 154.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for durable-actors 0.8.0
File Interpreter ABI Platform
durable_actors-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 218.4 kB

Release files / durable_actors-0.8.0.tar.gz

Download URL durable_actors-0.8.0.tar.gz
Size 154.6 kB
Tags Source
SHA-256 checksum
How to use checksums
faa737b9272d5e6fb5e9f5e78c43a0b038074981b1b2236f8244883a95510a0f
BLAKE2b-256 checksum
How to use checksums
3612f531a1ab98866fb36a7362f439300b84a790bc91bec2c4ad059cd6a4529f
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 Oct 10, 2026.

Transparency log

Release files / durable_actors-0.8.0-py3-none-any.whl

Download URL durable_actors-0.8.0-py3-none-any.whl
Size 63.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e26e86eb659aeab58b2e008f4465174b4af5f060955ee068cccbadfb4e1632d1
BLAKE2b-256 checksum
How to use checksums
eb66abf9477080d50eb193f775e387d099d9b6f3b67f268211bdd3bcf21dfc43
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 Oct 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.9

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page