Durable Functions For Python
Project description
Branch | Status |
---|---|
master | |
dev |
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
Python support for Durable Functions is currently in public preview. The following are the current known limitations.
Functionality
- Sub-orchestrations are not yet supported (planned #62)
- Durable Entities are not yet supported (not yet planned #96)
Tooling
- Python Durable Functions requires Azure Functions Core Tools version 3.0.2630 or higher.
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:
- Function Chaining
- Fan-out/Fan-in - Simple
- Fan-out/Fan-in - TensorFlow
- External Events - Human Interaction & Timeouts
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file azure-functions-durable-1.0.0b11.tar.gz
.
File metadata
- Download URL: azure-functions-durable-1.0.0b11.tar.gz
- Upload date:
- Size: 4.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f74b17f32f61d1b825e607847341e47b723ad8199a7a7f32693595bdd381dd14 |
|
MD5 | feb1c5da67b6851ef48545b153bff6be |
|
BLAKE2b-256 | f0c9aab51461d3cb350486af7708966d6ae137f32412df506409d008d29c4b68 |
File details
Details for the file azure_functions_durable-1.0.0b11-py3-none-any.whl
.
File metadata
- Download URL: azure_functions_durable-1.0.0b11-py3-none-any.whl
- Upload date:
- Size: 87.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4f2f8a80038fe4c5e7a39e76139352b737d49dee1c7fb0edd57bcbed9cabab5 |
|
MD5 | a1068a90fc0c1d01b86c96465c4a7c16 |
|
BLAKE2b-256 | 24224651ab356748d8109a009f1a9924526e8a61acc20a7c22b224010bae6971 |