Durable Functions For Python
Durable Functions for Python
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.
Python support for Durable Functions is currently in public preview. The following are the current known limitations.
- Sub-orchestrations are not yet supported (planned #62)
- Durable Entities are not yet supported (not yet planned #96)
- Python Durable Functions requires Azure Functions Core Tools version 3.0.2630 or higher.
Follow these instructions to get started with Durable Functions in Python:
Take a look at this project's samples directory:
- Function Chaining
- Fan-out/Fan-in - Simple
- Fan-out/Fan-in - TensorFlow
- External Events - Human Interaction & Timeouts
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 history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size azure_functions_durable-1.0.0b11-py3-none-any.whl (87.1 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size azure-functions-durable-1.0.0b11.tar.gz (4.9 MB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for azure_functions_durable-1.0.0b11-py3-none-any.whl
Hashes for azure-functions-durable-1.0.0b11.tar.gz