Skip to main content

Durable Functions For Python

Project description

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

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

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

azure-functions-durable-1.0.0b7.tar.gz (4.9 MB view details)

Uploaded Source

Built Distribution

File details

Details for the file azure-functions-durable-1.0.0b7.tar.gz.

File metadata

  • Download URL: azure-functions-durable-1.0.0b7.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

Hashes for azure-functions-durable-1.0.0b7.tar.gz
Algorithm Hash digest
SHA256 dd58fb5dc9c5fb20c5e0c9d3b7e86aa8911d13d7a117451b35bfdbfa254f1307
MD5 36de9cf0152835ae857efec8e6fefd6a
BLAKE2b-256 753217a9976d593b933c608d879a315582ddd28e3995f615d635b88df01f5482

See more details on using hashes here.

File details

Details for the file azure_functions_durable-1.0.0b7-py3-none-any.whl.

File metadata

  • Download URL: azure_functions_durable-1.0.0b7-py3-none-any.whl
  • Upload date:
  • Size: 80.4 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

Hashes for azure_functions_durable-1.0.0b7-py3-none-any.whl
Algorithm Hash digest
SHA256 9fc3f61399cac1be111de949884dec58fa919c5212ae6a239448583322d1c0a0
MD5 bc4893d0cc0571174c945f13d0cd5544
BLAKE2b-256 0465f99e0b698bb7bc6a6113cbb05e1136f501b13025777b46e8438871f452db

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page