Skip to content

Commit 71b8d5c

Browse files
Merge pull request #238875 from shreyabatra4/pystein-ga
V2 Programming Model for Python for Azure Functions
2 parents 5c877eb + 373b9c0 commit 71b8d5c

File tree

3 files changed

+5
-26
lines changed

3 files changed

+5
-26
lines changed

articles/azure-functions/create-first-function-cli-python.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ In this article, you use command-line tools to create a Python function that res
1616
This article covers both Python programming models supported by Azure Functions. Use the selector at the top to choose your programming model.
1717

1818
>[!NOTE]
19-
>The Python v2 programming model for Functions is currently in Preview. To learn more about the Python v2 programming model, see the [Developer Reference Guide](functions-reference-python.md).
19+
>The v2 programming model provides a decorator based approach to create functions. To learn more about the Python v2 programming model, see the [Developer Reference Guide](functions-reference-python.md).
2020
2121
Completing this quickstart incurs a small cost of a few USD cents or less in your Azure account.
2222

@@ -32,7 +32,7 @@ Before you begin, you must have the following requirements in place:
3232
+ The [Azure Functions Core Tools](functions-run-local.md#v2) version 4.x.
3333
::: zone-end
3434
::: zone pivot="python-mode-decorators"
35-
+ The [Azure Functions Core Tools](functions-run-local.md#v2) version 4.0.4785 or later.
35+
+ The [Azure Functions Core Tools](functions-run-local.md#v2) version 4.2.1 or later.
3636
::: zone-end
3737
+ One of the following tools for creating Azure resources:
3838

@@ -278,7 +278,6 @@ Use the following commands to create these items. Both Azure CLI and PowerShell
278278
---
279279
280280
::: zone pivot="python-mode-decorators"
281-
In the current v2 programming model preview, choose a region from one of the following locations: France Central, West Central US, North Europe, China East, East US, or North Central US.
282281
::: zone-end
283282
284283
> [!NOTE]

articles/azure-functions/create-first-function-vs-code-python.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ In this article, you use Visual Studio Code to create a Python function that res
1515
This article covers both Python programming models supported by Azure Functions. Use the selector at the top to choose your programming model.
1616

1717
>[!NOTE]
18-
>The Python v2 programming model for Functions is currently in Preview. To learn more about the v2 programming model, see the [Developer Reference Guide](functions-reference-python.md).
18+
>The v2 programming model provides a decorator based approach to create functions. To learn more about the v2 programming model, see the [Developer Reference Guide](functions-reference-python.md).
1919
2020
Completing this quickstart incurs a small cost of a few USD cents or less in your Azure account.
2121

@@ -165,7 +165,6 @@ In this section, you create a function app and related resources in your Azure s
165165
|**Select a location for new resources**| Choose a region for your function app.|
166166

167167
::: zone pivot="python-mode-decorators"
168-
In the current v2 programming model preview, choose a region from one of the following locations: France Central, West Central US, North Europe, China East, East US, or North Central US.
169168
::: zone-end
170169

171170
The extension shows the status of individual resources as they're being created in Azure in the **Azure: Activity Log** panel.

articles/azure-functions/functions-reference-python.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ zone_pivot_groups: python-mode-functions
1313
This guide is an introduction to developing Azure Functions by using Python. The article assumes that you've already read the [Azure Functions developers guide](functions-reference.md).
1414

1515
> [!IMPORTANT]
16-
> This article supports both the v1 and v2 programming model for Python in Azure Functions.
17-
> The Python v2 programming model is currently in preview.
16+
> This article supports both the v1 and v2 programming model for Python in Azure Functions.
1817
> The Python v1 model uses a *functions.json* file to define functions, and the new v2 model lets you instead use a decorator-based approach. This new approach results in a simpler file structure, and it's more code-centric. Choose the **v2** selector at the top of the article to learn about this new programming model.
1918
2019
As a Python developer, you might also be interested in one of the following articles:
@@ -115,8 +114,6 @@ def main(req: azure.functions.HttpRequest) -> str:
115114
return f'Hello, {user}!'
116115
```
117116

118-
At this time, only specific triggers and bindings are supported by the Python v2 programming model. For more information, see [Triggers and inputs](#triggers-and-inputs).
119-
120117
To learn about known limitations with the v2 model and their workarounds, see [Troubleshoot Python errors in Azure Functions](./recover-python-functions.md?pivots=python-mode-decorators).
121118
::: zone-end
122119

@@ -138,7 +135,7 @@ You can change the default behavior of a function by optionally specifying the `
138135

139136
::: zone-end
140137
::: zone pivot="python-mode-decorators"
141-
During preview, the entry point is only in the *function\_app.py* file. However, you can reference functions within the project in *function\_app.py* by using [blueprints](#blueprints) or by importing.
138+
The entry point is only in the *function\_app.py* file. However, you can reference functions within the project in *function\_app.py* by using [blueprints](#blueprints) or by importing.
142139
::: zone-end
143140

144141
## Folder structure
@@ -400,20 +397,6 @@ When the function is invoked, the HTTP request is passed to the function as `req
400397

401398
For data intensive binding operations, you may want to use a separate storage account. For more information, see [Storage account guidance](storage-considerations.md#storage-account-guidance).
402399

403-
::: zone pivot="python-mode-decorators"
404-
At this time, only specific triggers and bindings are supported by the Python v2 programming model. Supported triggers and bindings are as follows:
405-
406-
| Type | Trigger | Input binding | Output binding |
407-
| --- | :---: | :---: | :---: |
408-
| [HTTP](functions-bindings-http-webhook.md?pivots=programming-language-python) | x | | |
409-
| [Timer](functions-bindings-timer.md?pivots=programming-language-python) | x | | |
410-
| [Azure Queue Storage](functions-bindings-storage-queue.md?pivots=programming-language-python) | x | | x |
411-
| [Azure Service Bus topic](functions-bindings-service-bus.md?pivots=programming-language-python) | x | | x |
412-
| [Azure Service Bus queue](functions-bindings-service-bus.md?pivots=programming-language-python) | x | | x |
413-
| [Azure Cosmos DB](functions-bindings-cosmosdb-v2.md?pivots=programming-language-python) | x | x | x |
414-
| [Azure Blob Storage](functions-bindings-storage-blob.md?pivots=programming-language-python) | x | x | x |
415-
| [Azure Event Hubs](functions-bindings-event-hubs.md?pivots=programming-language-python) | x | | x |
416-
::: zone-end
417400

418401
## Outputs
419402

@@ -951,8 +934,6 @@ When you're using the new programming model, enable the following app setting in
951934

952935
When you're deploying the function, this setting isn't created automatically. You must explicitly create this setting in your function app in Azure for it to run by using the v2 model.
953936

954-
The multiple Python workers setting isn't supported in the v2 programming model at this time. This means that setting `FUNCTIONS_WORKER_PROCESS_COUNT` to greater than `1` isn't supported for functions that are developed by using the v2 model.
955-
956937
::: zone-end
957938

958939
## Python version

0 commit comments

Comments
 (0)