You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [Durable Functions](durable-functions-overview.md) extension introduces three trigger bindings that control the execution of orchestrator, entity, and activity functions. It also introduces an output binding that acts as a client for the Durable Functions runtime.
13
13
14
+
::: zone pivot="programming-language-python"
15
+
16
+
> [!IMPORTANT]
17
+
> This article supports both Python v1 and Python v2 programming models for Durable Functions.
18
+
> The Python v2 programming model is currently in preview.
19
+
20
+
## Python v2 programming model
21
+
22
+
Durable Functions provides preview support of the new [Python v2 programming model](../functions-reference-python.md?pivots=python-mode-decorators). To use the v2 model, you must install the Durable Functions SDK, which is the PyPI package `azure-functions-durable`, version `1.2.2` or a later version. During the preview, you can provide feedback and suggestions in the [Durable Functions SDK for Python repo](https://github.com/Azure/azure-functions-durable-python/issues).
23
+
24
+
Using [Extension Bundles](./functions-bindings-register.md#extension-bundles) isn't currently supported for the v2 model with Durable Functions. You'll instead need to manage your extensions manually as follows:
25
+
26
+
1. Remove the `extensionBundle` section of your `host.json` as described in [this Functions article](./functions-run-local.md#install-extensions).
27
+
28
+
1. Run the `func extensions install --package Microsoft.Azure.WebJobs.Extensions.DurableTask --version 2.9.1` command on your terminal. This installs the Durable Functions extension for your app, which allows you to use the v2 model preview.
29
+
30
+
::: zone-end
31
+
14
32
## Orchestration trigger
15
33
16
34
The orchestration trigger enables you to author [durable orchestrator functions](durable-functions-types-features-overview.md#orchestrator-functions). This trigger executes when a new orchestration instance is scheduled and when an existing orchestration instance receives an event. Examples of events that can trigger orchestrator functions include durable timer expirations, activity function responses, and events raised by external clients.
@@ -41,6 +59,8 @@ Azure Functions supports two programming models for Python. The way that you def
41
59
# [v2](#tab/python-v2)
42
60
The Python v2 programming model lets you define an orchestration trigger using the `orchestration_trigger` decorator directly in your Python function code.
43
61
62
+
In the v2 model, the Durable Functions triggers and bindings are accessed from an instance of `DFApp`, which is a subclass of `FunctionApp` that additionally exports Durable Functions-specific decorators.
63
+
44
64
# [v1](#tab/python-v1)
45
65
When you write orchestrator functions in the Python v1 programming model, the orchestration trigger is defined by the following JSON object in the `bindings` array of the *function.json* file:
46
66
@@ -57,10 +77,6 @@ When you write orchestrator functions in the Python v1 programming model, the or
57
77
58
78
---
59
79
60
-
This article supports both Python programming models.
61
-
62
-
> [!IMPORTANT]
63
-
> The Python v2 programming model is currently in preview.
64
80
::: zone-end
65
81
66
82
Internally, this trigger binding polls the configured durable store for new orchestration events, such as orchestration start events, durable timer expiration events, activity function response events, and external events raised by other functions.
0 commit comments