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)


async def cleanup_cache(payload: object) -> None:
    print("cleanup", payload)


runtime = create_durable_stack()
runtime.register_job("send-email", send_email)
runtime.register_recurring("cleanup-cache", "*/5 * * * *", "UTC", cleanup_cache)

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

recurring_run_id = await runtime.run_scheduled_job_now("cleanup-cache")
print("recurring run", recurring_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,
    )
)

Metadata

Release files for durablestack 0.1.0b6

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

Source distribution (sdist)

Source distribution for durablestack 0.1.0b6
File Size Uploaded Provenance Actions
durablestack-0.1.0b6.tar.gz 61.0 kB Without provenance Details for durablestack-0.1.0b6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for durablestack 0.1.0b6
File Interpreter ABI Platform Actions
durablestack-0.1.0b6-py3-none-any.whl Python 3 none any Details for durablestack-0.1.0b6-py3-none-any.whl

Total release size: 126.0 kB

Release files / durablestack-0.1.0b6.tar.gz

Download URL durablestack-0.1.0b6.tar.gz
Size 61.0 kB
Tags Source
SHA-256 checksum
How to use checksums
086d86bf4d6271e58ac5310606ba712fe7c5dd1494cb51a847790d95574ef651
BLAKE2b-256 checksum
How to use checksums
ce26267c7cb450d86b10c1522a6f1f9a7967481ba574e565ff3389da4cc1d11e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / durablestack-0.1.0b6-py3-none-any.whl

Download URL durablestack-0.1.0b6-py3-none-any.whl
Size 64.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3216902ccf40c48e59e5fa7dacd3f505db43c463d58b1b3806379ee33a655009
BLAKE2b-256 checksum
How to use checksums
f8eed7fb572d5121cb69d7c9b3df2e4b19cbb8253693b046f2c3193d150e3c75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for durablestack 0.1.0b6

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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