The `durabletask` library is a Python Client SDK for the Azure Durable Task Scheduler, enabling developers to define, schedule, and manage resilient and stateful workflows (orchestrations) using ordinary Python code. It is designed for building fault-tolerant, long-running processes. The current version is 1.4.0, and the project maintains an active release cadence.
pip install durabletaskVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates a simple 'Hello World' orchestration. It defines an activity (`HelloActivity`) and an orchestrator (`HelloOrchestrator`), registers them with a worker, and then schedules a new orchestration instance using the client. It assumes a Durable Task Scheduler emulator is running locally on `http://localhost:8080` (e.g., via Docker) and uses environment variables for configuration.
Upgrade your Python environment to 3.10 or a later supported version.
For current time, use `context.current_utc_datetime` or similar deterministic APIs provided by the SDK. Ensure all operations within orchestrators are replayable.
Wrap calls to activities in `try/except` blocks within your orchestrator to handle individual activity failures gracefully. Inspect `TaskFailedException.FailureDetails` for root cause information. Python does not support custom retry handlers directly in orchestrators; implement retry logic with loops, exception handling, and timers.
For Azure Durable Functions, refer to the Azure Functions documentation and use the appropriate SDK for your language (e.g., `azure-functions-durable` for Python).
Ensure the connection string matches the expected format: `Endpoint=http://localhost:8080;Authentication=None` for the local emulator (note `http` and port 8080) or `Endpoint=https://<scheduler-name>.durabletask.io;...` for Azure (note `https`). Verify `Authentication` parameter and port usage.
No dependency data recorded yet.