Skip to content

Commit 8bc9617

Browse files
committed
First pass at freshness v1 model.
1 parent f00a7c7 commit 8bc9617

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

articles/azure-functions/develop-python-worker-extensions.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Develop Python worker extensions for Azure Functions
33
description: Learn how to create and publish worker extensions that let you inject middleware behavior into Python functions running in Azure.
44
ms.topic: how-to
5-
ms.date: 6/1/2021
5+
ms.date: 3/29/2023
66
ms.custom: devx-track-python, py-fresh-zinc
77
---
88

@@ -20,9 +20,9 @@ In this tutorial, you'll learn how to:
2020

2121
Before you start, you must meet these requirements:
2222

23-
* [Python 3.6.x or above](https://www.python.org/downloads/release/python-374/). To check the full list of supported Python versions in Azure Functions, see the [Python developer guide](functions-reference-python.md#python-version).
23+
* [Python 3.7 or above](https://www.python.org/downloads). To check the full list of supported Python versions in Azure Functions, see the [Python developer guide](functions-reference-python.md#python-version).
2424

25-
* The [Azure Functions Core Tools](functions-run-local.md#v2), version 3.0.3568 or later.
25+
* The [Azure Functions Core Tools](functions-run-local.md#v2), version 4.0.5095 or later to support the [v2 Python programming model](./functions-reference-python). Check your version with `func --version`. To learn about updating, see [Azure Functions Core Tools on GitHub](https://github.com/Azure/azure-functions-core-tools).
2626

2727
* [Visual Studio Code](https://code.visualstudio.com/) installed on one of the [supported platforms](https://code.visualstudio.com/docs/supporting/requirements#_platforms).
2828

@@ -48,7 +48,7 @@ The folder for your extension project should be like the following structure:
4848
| **.venv/** | (Optional) Contains a Python virtual environment used for local development. |
4949
| **python_worker_extension/** | Contains the source code of the Python worker extension. This folder contains the main Python module to be published into PyPI. |
5050
| **setup.py** | Contains the metadata of the Python worker extension package. |
51-
| **readme.md** | (Optional) Contains the instruction and usage of your extension. This content is displayed as the description in the home page in your PyPI project. |
51+
| **readme.md** | Contains the instruction and usage of your extension. This content is displayed as the description in the home page in your PyPI project. |
5252

5353
### Configure project metadata
5454

@@ -76,6 +76,19 @@ The `pre_invocation_app_level` method is called by the Python worker before the
7676

7777
Similarly, the `post_invocation_app_level` is called after function execution. This example calculates the elapsed time based on the start time and current time. It also overwrites the return value of the HTTP response.
7878

79+
### Create a readme.md
80+
81+
Create a readme.md file in the root folder of your extension project. This file contains the instruction and usage of your extension. This content is displayed as the description in the home page in your PyPI project.
82+
83+
```markdown
84+
# Python Worker Extension Timer
85+
86+
In this file, tell your customers when they need to call `Extension.configure()`.
87+
88+
The readme should also document the extension capabilities, possible configuration,
89+
and usage of your extension.
90+
```
91+
7992
## Consume your extension locally
8093

8194
Now that you've created an extension, you can use it in an app project to verify it works as intended.

0 commit comments

Comments
 (0)