rotor
A durable process runtime for Python.
A process is persisted as a checkpoint and mailbox. A worker leases it for one or more messages, committing each transition independently.
from dataclasses import field
from rotor import DurableProcess, Start, message, on
@message
class Ask:
question: str
class State:
asked: list = field(default_factory=list)
class Oracle(DurableProcess[State]):
@on
async def start(self, msg: Start):
self.state.asked.append(f"born knowing: {msg.input}")
@on
async def ask(self, msg: Ask):
self.state.asked.append(msg.question)
if len(self.state.asked) > 3:
self.stop(output=self.state.asked)
Timers, child completion, approvals, and limit notifications all arrive as messages. Application code defines their meaning in handlers.
Install
pip install rotorcore # SQLite tier: zero dependencies
pip install "rotorcore[postgres]" # + asyncpg for production
pip install "rotorcore[vercel]" # Queue SDK + Postgres + S3 adapter
Metadata
Release files for rotorcore 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rotorcore-0.0.2.tar.gz | 89.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rotorcore-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 195.6 kB
Release files / rotorcore-0.0.2.tar.gz
| Download URL | rotorcore-0.0.2.tar.gz |
|---|---|
| Size | 89.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f29c116a834836de90db3bf5b4cfe6d19144113cad857b7d22924be8d849aa2d
|
|
BLAKE2b-256 checksum How to use checksums |
1ae9d710698622340c788a66136266c11df5826af6899d5931feaa6c6d2da9a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.0
|
Release files / rotorcore-0.0.2-py3-none-any.whl
| Download URL | rotorcore-0.0.2-py3-none-any.whl |
|---|---|
| Size | 105.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e5d06046007fb1a4d949bf381c1aa81c8e632f84e6dec236c227a8bd1229f8d
|
|
BLAKE2b-256 checksum How to use checksums |
0a81c6ac45a0c8de9f0cb4de055fac018a8896d63ab2fba599223f72730dc87f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.0
|