Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

DurableStack for Python

DurableStack Logo

DurableStack provides reliable background jobs and recurring scheduling for Python applications.

Install

pip install durablestack

Quick Start

from datetime import datetime, UTC

from durablestack import create_durable_stack


async def send_email(payload: object) -> None:
    print("sending", payload)


runtime = create_durable_stack()
runtime.register_job("send-email", send_email)

await runtime.start()
run_id = await runtime.enqueue("send-email", {"to": "hello@example.com"})
print("enqueued", run_id)

await runtime.stop()

Providers

  • InMemory
  • PostgreSQL
  • MySQL
  • SQL Server
  • SQLite

Runtime Features

  • Durable lifecycle with lease-based execution
  • Retries with configurable backoff behavior
  • Recurring schedules with IANA time zones
  • Runtime-control command sync and receipt tracking
  • Hosted telemetry ingestion support

Optional Hosted Eventing / Runtime-Control

When tenant credentials are configured, the runtime can publish telemetry and receive runtime-control commands.

from durablestack.core.options import DurableStackOptions, EventingOptions
from durablestack import create_durable_stack

runtime = create_durable_stack(
    DurableStackOptions(
        eventing=EventingOptions(
            tenant_id="<tenant-id>",
            client_secret="<client-secret>",
            service_name="my-python-worker",
        ),
        include_error_detail_in_events=True,
    )
)

Project Links

Download files

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

Source Distribution

durablestack-0.1.0b2.tar.gz (60.1 kB view details)

Uploaded Source

Built Distribution

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

durablestack-0.1.0b2-py3-none-any.whl (64.2 kB view details)

Uploaded Python 3

File details

Details for the file durablestack-0.1.0b2.tar.gz.

File metadata

  • Download URL: durablestack-0.1.0b2.tar.gz
  • Upload date:
  • Size: 60.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for durablestack-0.1.0b2.tar.gz
Algorithm Hash digest
SHA256 2b87a68f31563490008fda0e7b5c96710c5b6f53fdb2c141150655abfdf396d2
MD5 703e6b60f728dfd7db3bc5340f4af76c
BLAKE2b-256 97d58ad471a77d3ae011dfa7ba3e59b77593535cbdd959fe48a02a3954782d95

See more details on using hashes here.

File details

Details for the file durablestack-0.1.0b2-py3-none-any.whl.

File metadata

  • Download URL: durablestack-0.1.0b2-py3-none-any.whl
  • Upload date:
  • Size: 64.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for durablestack-0.1.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 ea5aa8fa957571b93bb8383e9773d30a5605068d513abc2993ac406592a7c411
MD5 c8788f2b988d74fe76cad365549b70ac
BLAKE2b-256 01d9cd74d592d4b14fb0f9070d3cdc88f34345064fb34ce5b2165be1a06e95af

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0b2 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