Skip to main content
Pre-release

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

Branch Status
master Build Status
dev Build Status

Durable Functions for Python

The azure-functions-durable pip package allows you to write Durable Functions for Python. Durable Functions is an extension of Azure Functions that lets you write stateful functions and workflows in a serverless environment. The extension manages state, checkpoints, and restarts for you. Durable Functions' advantages include:

  • Define workflows in code. No JSON schemas or designers are needed.
  • Call other functions synchronously and asynchronously. Output from called functions can be saved to local variables.
  • Automatically checkpoint progress whenever the function schedules async work. Local state is never lost if the process recycles or the VM reboots.

You can find more information at the following links:

A durable function, or orchestration, is a solution made up of different types of Azure Functions:

  • Activity: the functions and tasks being orchestrated by your workflow.
  • Orchestrator: a function that describes the way and order actions are executed in code.
  • Client: the entry point for creating an instance of a durable orchestration.

Durable Functions' function types and features are documented in-depth here.

Current limitations

We're actively working on Python support for Durable Functions and we expect a Public Preview announcement in Q2 CY2020. The following are the current known limitations.

Functionality

  • DurableOrchestrationContext.create_timer() is not yet supported (coming soon #35)
  • Sub-orchestrations are not yet supported (planned #62)
  • Durable Entities are not yet supported (not yet planned #96)

Tooling

  • Python Durable Functions requires updated versions of Azure Functions Core Tools that includes Python worker 1.1.0, templates (bundle-1.2.0), and extension bundles (1.2.0) that are not yet released (ETA May 2020). Use the VS Code dev container in the Getting Started section to access a development environment with the required versions of the tools installed.

Deployment

  • Python Durable Functions requires an updated version of the Azure Functions Python language worker (1.1.0) that is not yet available in Azure. Deploy your Python Durable Functions apps in containers (requires Premium or App Service plans). (Linux consumption plan support ETA May 2020)

Getting Started

Follow these instructions to get started with Durable Functions in Python:

🚀 Python Durable Functions quickstart

Samples

Take a look at this project's samples directory:

Orchestrator example

import azure.durable_functions as df


def orchestrator_function(context: df.DurableOrchestrationContext):
    task1 = yield context.call_activity("DurableActivity", "One")
    task2 = yield context.call_activity("DurableActivity", "Two")
    task3 = yield context.call_activity("DurableActivity", "Three")

    outputs = [task1, task2, task3]
    return outputs


main = df.Orchestrator.create(orchestrator_function)

Release files for azure-functions-durable 1.0.0b5

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

Source distribution (sdist)

Source distribution for azure-functions-durable 1.0.0b5
File Size Uploaded
azure-functions-durable-1.0.0b5.tar.gz 4.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for azure-functions-durable 1.0.0b5
File Interpreter ABI Platform
azure_functions_durable-1.0.0b5-py3-none-any.whl Python 3 none any Details

Total release size: 4.9 MB

Release files / azure-functions-durable-1.0.0b5.tar.gz

Download URL azure-functions-durable-1.0.0b5.tar.gz
Size 4.8 MB
Tags Source
SHA-256 checksum
How to use checksums
4cada9878b6c1f271dcbd3ad88c8ff3442d2cb7fadaaae25b42641ae82155435
BLAKE2b-256 checksum
How to use checksums
b9d3107740aee7beae06b6d2faaca366a204446c4fe989d533b50cc8df040c1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.17

Release files / azure_functions_durable-1.0.0b5-py3-none-any.whl

Download URL azure_functions_durable-1.0.0b5-py3-none-any.whl
Size 65.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a7e42029c743fb10b3c07ba7d961f9b32d8fcbb50ae4dcd630ccfd48219acee
BLAKE2b-256 checksum
How to use checksums
48d969870bba5a1be892fa6c945241924d8918300fb2fb9f5391704d5e5f1570
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.17

Release history Release notifications | RSS feed

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.10

2 release files

1.2.9

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.1

2 release files

1.0.0

2 release files

This release

1.0.0b5 This release

2 release 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