Skip to content

Durable Workflow Python SDK

API reference for durable-workflow, the Python SDK for the Durable Workflow server. For conceptual documentation, tutorials, and the overall architecture, see the main docs site.

Install

pip install durable-workflow

With the optional Prometheus metrics recorder:

pip install 'durable-workflow[prometheus]'
  • Client — start workflows, signal, query, update, wait for results, manage schedules.
  • Worker — poll the server for workflow and activity tasks, dispatch to registered handlers.
  • Workflow — workflow-side primitives: ActivityRetryPolicy, ChildWorkflowRetryPolicy, ContinueAsNew, StartChildWorkflow, signal/query/update decorators, and query-state replay helpers.
  • Activity — activity decorator and execution context.
  • Errors — typed exceptions raised by the client and worker.
  • Retry policy — HTTP transport retry configuration for the client. Durable activity and child workflow retry policies are workflow primitives, not transport settings.
  • Metrics — pluggable recorders, including a Prometheus adapter.
  • Serializer — payload encoding and decoding helpers.
  • External storage — reference envelopes and driver contracts for large-payload offload.
  • Invocable carriers — activity-grade external-task adapter for HTTP and serverless handlers.
  • Sync helpers — blocking wrappers around the async client for scripts and tests.

Versioning

This reference is generated from the main branch of durable-workflow/sdk-python on every push. For the version installed in your project, check durable_workflow.__version__.