|
5 | 5 |
|
6 | 6 | # Durable Functions for Python
|
7 | 7 |
|
8 |
| -The `azure-functions-durable` [pip](https://pypi.org/project/azure-functions-durable/) package allows you to write [Durable Functions](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview) for [Python](https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python). Durable Functions is an extension of [Azure Functions](https://docs.microsoft.com/en-us/azure/azure-functions/functions-overview) 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: |
| 8 | + [Durable Functions](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview) is an extension of [Azure Functions](https://docs.microsoft.com/en-us/azure/azure-functions/functions-overview) that lets you write stateful functions in a serverless compute environment. The extension lets you define stateful workflows by writing orchestrator functions and stateful entities by writing entity functions using the Azure Functions programming model. Behind the scenes, the extension manages state, checkpoints, and restarts for you, allowing you to focus on your business logic. |
| 9 | + |
| 10 | + 🐍 Find us on PyPi [here](https://pypi.org/project/azure-functions-durable/) 🐍 |
9 | 11 |
|
10 |
| -* Define workflows in code. No JSON schemas or designers are needed. |
11 |
| -* Call other functions synchronously and asynchronously. Output from called functions can be saved to local variables. |
12 |
| -* Automatically checkpoint progress whenever the function schedules async work. Local state is never lost if the process recycles or the VM reboots. |
13 | 12 |
|
14 | 13 | You can find more information at the following links:
|
15 | 14 |
|
16 | 15 | * [Azure Functions overview](https://docs.microsoft.com/en-us/azure/azure-functions/functions-overview)
|
17 | 16 | * [Azure Functions Python developers guide](https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python)
|
18 | 17 | * [Durable Functions overview](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=python)
|
| 18 | +* [Core concepts and features overview](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-types-features-overview). |
19 | 19 |
|
20 |
| -A durable function, or _orchestration_, is a solution made up of different types of Azure Functions: |
21 |
| - |
22 |
| -* **Activity:** the functions and tasks being orchestrated by your workflow. |
23 |
| -* **Orchestrator:** a function that describes the way and order actions are executed in code. |
24 |
| -* **Client:** the entry point for creating an instance of a durable orchestration. |
25 |
| - |
26 |
| -Durable Functions' function types and features are documented in-depth [here.](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-types-features-overview) |
27 |
| - |
28 |
| -## Current limitations |
29 |
| - |
30 |
| -Python support for Durable Functions is currently in public preview. The following are the current known limitations. |
31 |
| - |
32 |
| -### Functionality |
33 |
| - |
34 |
| -* Sub-orchestrations are not yet supported (planned [#62](https://github.com/Azure/azure-functions-durable-python/issues/62)) |
35 |
| -* Durable Entities are not yet supported (not yet planned [#96](https://github.com/Azure/azure-functions-durable-python/issues/96)) |
36 |
| - |
37 |
| -### Tooling |
38 |
| - |
39 |
| -* Python Durable Functions requires [Azure Functions Core Tools](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local) version 3.0.2630 or higher. |
| 20 | +> Durable Functions expects certain programming constraints to be followed. Please read the documentation linked above for more information. |
40 | 21 |
|
41 | 22 | ## Getting Started
|
42 | 23 |
|
43 | 24 | Follow these instructions to get started with Durable Functions in Python:
|
44 | 25 |
|
45 | 26 | **🚀 [Python Durable Functions quickstart](https://docs.microsoft.com/azure/azure-functions/durable/quickstart-python-vscode)**
|
46 | 27 |
|
47 |
| -## Samples |
48 |
| - |
49 |
| -Take a look at this project's [samples directory](./samples/): |
50 |
| - |
51 |
| -* [Function Chaining](./samples/function_chaining) |
52 |
| -* [Fan-out/Fan-in - Simple](./samples/fan_out_fan_in) |
53 |
| -* [Fan-out/Fan-in - TensorFlow](./samples/fan_out_fan_in_tensorflow) |
54 |
| -* [External Events - Human Interaction & Timeouts](./samples/external_events) |
55 |
| - |
56 |
| -### Orchestrator example |
57 |
| - |
58 |
| -```python |
59 |
| -import azure.durable_functions as df |
60 |
| - |
61 |
| - |
62 |
| -def orchestrator_function(context: df.DurableOrchestrationContext): |
63 |
| - task1 = yield context.call_activity("DurableActivity", "One") |
64 |
| - task2 = yield context.call_activity("DurableActivity", "Two") |
65 |
| - task3 = yield context.call_activity("DurableActivity", "Three") |
66 |
| - |
67 |
| - outputs = [task1, task2, task3] |
68 |
| - return outputs |
69 |
| - |
| 28 | +## Tooling |
70 | 29 |
|
71 |
| -main = df.Orchestrator.create(orchestrator_function) |
72 |
| -``` |
| 30 | +* Python Durable Functions requires [Azure Functions Core Tools](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local) version 3.0.2630 or higher. |
0 commit comments