Skip to main content

rotor

A durable process runtime for Python.

[!WARNING] Rotor is experimental and unstable. APIs, storage formats, and behavior may change without notice. Do not use it for production workloads.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rotorcore-0.0.1.tar.gz (97.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rotorcore-0.0.1-py3-none-any.whl (113.6 kB view details)

Uploaded Python 3

File details

Details for the file rotorcore-0.0.1.tar.gz.

File metadata

  • Download URL: rotorcore-0.0.1.tar.gz
  • Upload date:
  • Size: 97.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.0

File hashes

Hashes for rotorcore-0.0.1.tar.gz
Algorithm Hash digest
SHA256 78f8bfedc66cb0a36e9f58131fe8718b3c56063c4941b10143590fefceff356e
MD5 7b54c03c1f4e854b045c4ce2fc7f20d7
BLAKE2b-256 8e71d1a8ab473f837e3565de4bdcb87d622ecb0a410c31ade54ea553f5255754

See more details on using hashes here.

File details

Details for the file rotorcore-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: rotorcore-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 113.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.0

File hashes

Hashes for rotorcore-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 02905bea98e50070d5c5bef25a2dce61e3b4eda3bbcfb1305472523f39a2afa7
MD5 439aa421003410c98ef377f5b1b3112d
BLAKE2b-256 46f2fa0b8f8d1e4c6cc06580bea5c26f08f5b2b4229d9fb44f2d1a4829812906

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 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