azure-functions-runtime 1.0.0.dev0__tar.gz → 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. {azure_functions_runtime-1.0.0.dev0 → azure_functions_runtime-1.1.0}/PKG-INFO +120 -119
  2. {azure_functions_runtime-1.0.0.dev0 → azure_functions_runtime-1.1.0}/README.md +70 -70
  3. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/__init__.py +23 -13
  4. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/bindings/context.py +69 -66
  5. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/bindings/datumdef.py +232 -232
  6. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/bindings/generic.py +75 -75
  7. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/bindings/meta.py +325 -294
  8. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/bindings/nullable_converters.py +126 -114
  9. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/bindings/out.py +15 -15
  10. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/bindings/retrycontext.py +47 -47
  11. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/bindings/tracecontext.py +43 -43
  12. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/functions.py +450 -434
  13. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/handle_event.py +453 -441
  14. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/http_v2.py +291 -291
  15. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/loader.py +219 -201
  16. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/logging.py +16 -16
  17. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/otel.py +116 -116
  18. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/utils/__init__.py +2 -2
  19. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/utils/app_setting_manager.py +102 -102
  20. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/utils/constants.py +64 -63
  21. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/utils/executor.py +40 -34
  22. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/utils/helpers.py +40 -40
  23. azure_functions_runtime-1.1.0/azure_functions_runtime/utils/threadpool.py +88 -0
  24. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/utils/tracing.py +68 -70
  25. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/utils/typing_inspect.py +295 -295
  26. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/utils/validators.py +19 -19
  27. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/utils/wrappers.py +53 -52
  28. {azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2 → azure_functions_runtime-1.1.0/azure_functions_runtime}/version.py +4 -4
  29. {azure_functions_runtime-1.0.0.dev0 → azure_functions_runtime-1.1.0}/azure_functions_runtime.egg-info/PKG-INFO +120 -119
  30. azure_functions_runtime-1.1.0/azure_functions_runtime.egg-info/SOURCES.txt +33 -0
  31. {azure_functions_runtime-1.0.0.dev0 → azure_functions_runtime-1.1.0}/azure_functions_runtime.egg-info/requires.txt +1 -0
  32. azure_functions_runtime-1.1.0/azure_functions_runtime.egg-info/top_level.txt +2 -0
  33. {azure_functions_runtime-1.0.0.dev0 → azure_functions_runtime-1.1.0}/pyproject.toml +103 -102
  34. {azure_functions_runtime-1.0.0.dev0 → azure_functions_runtime-1.1.0}/setup.cfg +4 -4
  35. azure_functions_runtime-1.0.0.dev0/azure_functions_runtime.egg-info/SOURCES.txt +0 -32
  36. azure_functions_runtime-1.0.0.dev0/azure_functions_runtime.egg-info/top_level.txt +0 -3
  37. {azure_functions_runtime-1.0.0.dev0 → azure_functions_runtime-1.1.0}/azure_functions_runtime.egg-info/dependency_links.txt +0 -0
@@ -1,119 +1,120 @@
1
- Metadata-Version: 2.4
2
- Name: azure-functions-runtime
3
- Version: 1.0.0.dev0
4
- Summary: Python Language Worker for Azure Functions Runtime
5
- Author-email: "Azure Functions team at Microsoft Corp." <azurefunctions@microsoft.com>
6
- Project-URL: Documentation, https://github.com/Azure/azure-functions-python-worker/blob/dev/azure_functions_worker_v2/README.md
7
- Project-URL: Repository, https://github.com/Azure/azure-functions-python-worker
8
- Keywords: azure,functions,azurefunctions,python,serverless
9
- Classifier: Development Status :: 5 - Production/Stable
10
- Classifier: Programming Language :: Python
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.13
13
- Classifier: Operating System :: Microsoft :: Windows
14
- Classifier: Operating System :: POSIX
15
- Classifier: Operating System :: MacOS :: MacOS X
16
- Classifier: Environment :: Web Environment
17
- Classifier: License :: OSI Approved :: MIT License
18
- Classifier: Intended Audience :: Developers
19
- Requires-Python: >=3.13
20
- Description-Content-Type: text/markdown
21
- Requires-Dist: azurefunctions-extensions-base
22
- Requires-Dist: azure-functions
23
- Provides-Extra: dev
24
- Requires-Dist: azure-monitor-opentelemetry; extra == "dev"
25
- Requires-Dist: flake8==6.*; extra == "dev"
26
- Requires-Dist: mypy; extra == "dev"
27
- Requires-Dist: pytest; extra == "dev"
28
- Requires-Dist: requests==2.*; extra == "dev"
29
- Requires-Dist: coverage; extra == "dev"
30
- Requires-Dist: grpcio~=1.70.0; extra == "dev"
31
- Requires-Dist: grpcio-tools~=1.70.0; extra == "dev"
32
- Requires-Dist: pytest-sugar; extra == "dev"
33
- Requires-Dist: pytest-cov; extra == "dev"
34
- Requires-Dist: pytest-xdist; extra == "dev"
35
- Requires-Dist: pytest-randomly; extra == "dev"
36
- Requires-Dist: pytest-instafail; extra == "dev"
37
- Requires-Dist: pytest-rerunfailures; extra == "dev"
38
- Requires-Dist: pytest-asyncio; extra == "dev"
39
- Requires-Dist: pre-commit; extra == "dev"
40
- Requires-Dist: invoke; extra == "dev"
41
- Provides-Extra: test-http-v2
42
- Requires-Dist: azurefunctions-extensions-http-fastapi==1.0.0; extra == "test-http-v2"
43
- Requires-Dist: ujson; extra == "test-http-v2"
44
- Requires-Dist: orjson; extra == "test-http-v2"
45
- Provides-Extra: test-deferred-bindings
46
- Requires-Dist: azurefunctions-extensions-bindings-blob==1.0.0; extra == "test-deferred-bindings"
47
- Requires-Dist: azurefunctions-extensions-bindings-eventhub==1.0.0b1; extra == "test-deferred-bindings"
48
-
49
- # <img src="https://raw.githubusercontent.com/Azure/azure-functions-python-worker/dev/docs/Azure.Functions.svg" width = "30" alt="Functions Header Image - Lightning Logo"> Azure Functions Python Worker
50
-
51
- | Branch | Build Status | CodeCov | Test Status |
52
- |--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
53
- | dev | [![Build Status](https://img.shields.io/azure-devops/build/azfunc/public/658/dev)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=658&branchName=dev) | [![codecov](https://codecov.io/gh/Azure/azure-functions-python-worker/branch/dev/graph/badge.svg)](https://codecov.io/gh/Azure/azure-functions-python-worker) | [![Test Status](https://img.shields.io/azure-devops/build/azfunc/public/658/dev)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=658&branchName=dev) |
54
-
55
- Python support for Azure Functions is based on Python 3.13 serverless hosting on Linux and the Functions 4.0 runtime.
56
-
57
- Here is the current status of Python in Azure Functions:
58
-
59
- What are the supported Python versions?
60
-
61
- | Azure Functions Runtime | Python 3.13 |
62
- |----------------------------------|-------------|
63
- | Azure Functions 4.0 | ✔ |
64
-
65
- For information about Azure Functions Runtime, please refer to [Azure Functions runtime versions overview](https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions) page.
66
-
67
- ### What's available?
68
-
69
- - Build, test, debug, and publish using Azure Functions Core Tools (CLI) or Visual Studio Code
70
- - Deploy Python Function project onto consumption, dedicated, elastic premium, or flex consumption plan.
71
- - Deploy Python Function project in a custom docker image onto dedicated or elastic premium plan.
72
- - Triggers / Bindings : Blob, Cosmos DB, Event Grid, Event Hub, HTTP, Kafka, MySQL, Queue, ServiceBus, SQL, Timer, and Warmup
73
- - Triggers / Bindings : Custom binding support
74
-
75
- ### What's new?
76
-
77
- - [SDK Type Bindings for Blob](https://techcommunity.microsoft.com/t5/azure-compute-blog/azure-functions-sdk-type-bindings-for-azure-blob-storage-with/ba-p/4146744)
78
- - [HTTP Streaming](https://techcommunity.microsoft.com/t5/azure-compute-blog/azure-functions-support-for-http-streams-in-python-is-now-in/ba-p/4146697)
79
-
80
- ### Get Started
81
-
82
- - [Create your first Python function](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-python)
83
- - [Developer guide](https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python)
84
- - [Binding API reference](https://docs.microsoft.com/en-us/python/api/azure-functions/azure.functions?view=azure-python)
85
- - [Develop using VS Code](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-vs-code)
86
- - [Create a Python Function on Linux using a custom docker image](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-function-linux-custom-image)
87
-
88
- # Give Feedback
89
-
90
- Issues and feature requests are tracked in a variety of places. To report this feedback, please file an issue to the relevant repository below:
91
-
92
- | Item | Description | Link |
93
- |---------------|----------------------------------------------|--------------------------------------------------------------------------------|
94
- | Python Worker | Programming Model, Triggers & Bindings | [File an Issue](https://github.com/Azure/azure-functions-python-worker/issues) |
95
- | Runtime | Script Host & Language Extensibility | [File an Issue](https://github.com/Azure/azure-functions-host/issues) |
96
- | VSCode | VSCode Extension for Azure Functions | [File an Issue](https://github.com/microsoft/vscode-azurefunctions/issues) |
97
- | Core Tools | Command Line Interface for Local Development | [File an Issue](https://github.com/Azure/azure-functions-core-tools/issues) |
98
- | Templates | Code Issues with Creation Template | [File an Issue](https://github.com/Azure/azure-functions-templates/issues) |
99
-
100
- # Contribute
101
-
102
- This project welcomes contributions and suggestions. Most contributions require you to agree to a
103
- Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
104
- the rights to use your contribution. For details, visit https://cla.microsoft.com.
105
-
106
- Here are some pointers to get started:
107
-
108
- - [Language worker architecture](https://github.com/Azure/azure-functions-python-worker/wiki/Worker-Architecture)
109
- - [Setting up the development environment](https://github.com/Azure/azure-functions-python-worker/wiki/Contributor-Guide)
110
- - [Adding support for a new binding](https://github.com/Azure/azure-functions-python-worker/wiki/Adding-support-for-a-new-binding-type)
111
- - [Release instructions](https://github.com/Azure/azure-functions-python-worker/wiki/Release-Instructions)
112
-
113
- When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
114
- a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
115
- provided by the bot. You will only need to do this once across all repos using our CLA.
116
-
117
- This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
118
- For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
119
- contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
1
+ Metadata-Version: 2.4
2
+ Name: azure-functions-runtime
3
+ Version: 1.1.0
4
+ Summary: Python Language Worker for Azure Functions Runtime
5
+ Author-email: "Azure Functions team at Microsoft Corp." <azurefunctions@microsoft.com>
6
+ Project-URL: Documentation, https://github.com/Azure/azure-functions-python-worker/blob/dev/azure_functions_runtime/README.md
7
+ Project-URL: Repository, https://github.com/Azure/azure-functions-python-worker
8
+ Keywords: azure,functions,azurefunctions,python,serverless
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Classifier: Operating System :: POSIX
15
+ Classifier: Operating System :: MacOS :: MacOS X
16
+ Classifier: Environment :: Web Environment
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Intended Audience :: Developers
19
+ Requires-Python: >=3.13
20
+ Description-Content-Type: text/markdown
21
+ Requires-Dist: azurefunctions-extensions-base
22
+ Requires-Dist: azure-functions
23
+ Provides-Extra: dev
24
+ Requires-Dist: azure-monitor-opentelemetry; extra == "dev"
25
+ Requires-Dist: flake8==6.*; extra == "dev"
26
+ Requires-Dist: mypy; extra == "dev"
27
+ Requires-Dist: pytest; extra == "dev"
28
+ Requires-Dist: requests==2.*; extra == "dev"
29
+ Requires-Dist: coverage; extra == "dev"
30
+ Requires-Dist: grpcio~=1.70.0; extra == "dev"
31
+ Requires-Dist: grpcio-tools~=1.70.0; extra == "dev"
32
+ Requires-Dist: protobuf~=5.29.0; extra == "dev"
33
+ Requires-Dist: pytest-sugar; extra == "dev"
34
+ Requires-Dist: pytest-cov; extra == "dev"
35
+ Requires-Dist: pytest-xdist; extra == "dev"
36
+ Requires-Dist: pytest-randomly; extra == "dev"
37
+ Requires-Dist: pytest-instafail; extra == "dev"
38
+ Requires-Dist: pytest-rerunfailures; extra == "dev"
39
+ Requires-Dist: pytest-asyncio; extra == "dev"
40
+ Requires-Dist: pre-commit; extra == "dev"
41
+ Requires-Dist: invoke; extra == "dev"
42
+ Provides-Extra: test-http-v2
43
+ Requires-Dist: azurefunctions-extensions-http-fastapi==1.0.0; extra == "test-http-v2"
44
+ Requires-Dist: ujson; extra == "test-http-v2"
45
+ Requires-Dist: orjson; extra == "test-http-v2"
46
+ Provides-Extra: test-deferred-bindings
47
+ Requires-Dist: azurefunctions-extensions-bindings-blob==1.0.0; extra == "test-deferred-bindings"
48
+ Requires-Dist: azurefunctions-extensions-bindings-eventhub==1.0.0b1; extra == "test-deferred-bindings"
49
+
50
+ # <img src="https://raw.githubusercontent.com/Azure/azure-functions-python-worker/dev/docs/Azure.Functions.svg" width = "30" alt="Functions Header Image - Lightning Logo"> Azure Functions Python Worker
51
+
52
+ | Branch | Build Status | CodeCov | Test Status |
53
+ |--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
54
+ | dev | [![Build Status](https://img.shields.io/azure-devops/build/azfunc/public/658/dev)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=658&branchName=dev) | [![codecov](https://codecov.io/gh/Azure/azure-functions-python-worker/branch/dev/graph/badge.svg)](https://codecov.io/gh/Azure/azure-functions-python-worker) | [![Test Status](https://img.shields.io/azure-devops/build/azfunc/public/658/dev)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=658&branchName=dev) |
55
+
56
+ Python support for Azure Functions is based on Python 3.13 serverless hosting on Linux and the Functions 4.0 runtime.
57
+
58
+ Here is the current status of Python in Azure Functions:
59
+
60
+ What are the supported Python versions?
61
+
62
+ | Azure Functions Runtime | Python 3.13 |
63
+ |----------------------------------|-------------|
64
+ | Azure Functions 4.0 | ✔ |
65
+
66
+ For information about Azure Functions Runtime, please refer to [Azure Functions runtime versions overview](https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions) page.
67
+
68
+ ### What's available?
69
+
70
+ - Build, test, debug, and publish using Azure Functions Core Tools (CLI) or Visual Studio Code
71
+ - Deploy Python Function project onto consumption, dedicated, elastic premium, or flex consumption plan.
72
+ - Deploy Python Function project in a custom docker image onto dedicated or elastic premium plan.
73
+ - Triggers / Bindings : Blob, Cosmos DB, Event Grid, Event Hub, HTTP, Kafka, MySQL, Queue, ServiceBus, SQL, Timer, and Warmup
74
+ - Triggers / Bindings : Custom binding support
75
+
76
+ ### What's new?
77
+
78
+ - [SDK Type Bindings for Blob](https://techcommunity.microsoft.com/t5/azure-compute-blog/azure-functions-sdk-type-bindings-for-azure-blob-storage-with/ba-p/4146744)
79
+ - [HTTP Streaming](https://techcommunity.microsoft.com/t5/azure-compute-blog/azure-functions-support-for-http-streams-in-python-is-now-in/ba-p/4146697)
80
+
81
+ ### Get Started
82
+
83
+ - [Create your first Python function](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-python)
84
+ - [Developer guide](https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python)
85
+ - [Binding API reference](https://docs.microsoft.com/en-us/python/api/azure-functions/azure.functions?view=azure-python)
86
+ - [Develop using VS Code](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-vs-code)
87
+ - [Create a Python Function on Linux using a custom docker image](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-function-linux-custom-image)
88
+
89
+ # Give Feedback
90
+
91
+ Issues and feature requests are tracked in a variety of places. To report this feedback, please file an issue to the relevant repository below:
92
+
93
+ | Item | Description | Link |
94
+ |---------------|----------------------------------------------|--------------------------------------------------------------------------------|
95
+ | Python Worker | Programming Model, Triggers & Bindings | [File an Issue](https://github.com/Azure/azure-functions-python-worker/issues) |
96
+ | Runtime | Script Host & Language Extensibility | [File an Issue](https://github.com/Azure/azure-functions-host/issues) |
97
+ | VSCode | VSCode Extension for Azure Functions | [File an Issue](https://github.com/microsoft/vscode-azurefunctions/issues) |
98
+ | Core Tools | Command Line Interface for Local Development | [File an Issue](https://github.com/Azure/azure-functions-core-tools/issues) |
99
+ | Templates | Code Issues with Creation Template | [File an Issue](https://github.com/Azure/azure-functions-templates/issues) |
100
+
101
+ # Contribute
102
+
103
+ This project welcomes contributions and suggestions. Most contributions require you to agree to a
104
+ Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
105
+ the rights to use your contribution. For details, visit https://cla.microsoft.com.
106
+
107
+ Here are some pointers to get started:
108
+
109
+ - [Language worker architecture](https://github.com/Azure/azure-functions-python-worker/wiki/Worker-Architecture)
110
+ - [Setting up the development environment](https://github.com/Azure/azure-functions-python-worker/wiki/Contributor-Guide)
111
+ - [Adding support for a new binding](https://github.com/Azure/azure-functions-python-worker/wiki/Adding-support-for-a-new-binding-type)
112
+ - [Release instructions](https://github.com/Azure/azure-functions-python-worker/wiki/Release-Instructions)
113
+
114
+ When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
115
+ a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
116
+ provided by the bot. You will only need to do this once across all repos using our CLA.
117
+
118
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
119
+ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
120
+ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
@@ -1,71 +1,71 @@
1
- # <img src="https://raw.githubusercontent.com/Azure/azure-functions-python-worker/dev/docs/Azure.Functions.svg" width = "30" alt="Functions Header Image - Lightning Logo"> Azure Functions Python Worker
2
-
3
- | Branch | Build Status | CodeCov | Test Status |
4
- |--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
5
- | dev | [![Build Status](https://img.shields.io/azure-devops/build/azfunc/public/658/dev)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=658&branchName=dev) | [![codecov](https://codecov.io/gh/Azure/azure-functions-python-worker/branch/dev/graph/badge.svg)](https://codecov.io/gh/Azure/azure-functions-python-worker) | [![Test Status](https://img.shields.io/azure-devops/build/azfunc/public/658/dev)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=658&branchName=dev) |
6
-
7
- Python support for Azure Functions is based on Python 3.13 serverless hosting on Linux and the Functions 4.0 runtime.
8
-
9
- Here is the current status of Python in Azure Functions:
10
-
11
- What are the supported Python versions?
12
-
13
- | Azure Functions Runtime | Python 3.13 |
14
- |----------------------------------|-------------|
15
- | Azure Functions 4.0 | ✔ |
16
-
17
- For information about Azure Functions Runtime, please refer to [Azure Functions runtime versions overview](https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions) page.
18
-
19
- ### What's available?
20
-
21
- - Build, test, debug, and publish using Azure Functions Core Tools (CLI) or Visual Studio Code
22
- - Deploy Python Function project onto consumption, dedicated, elastic premium, or flex consumption plan.
23
- - Deploy Python Function project in a custom docker image onto dedicated or elastic premium plan.
24
- - Triggers / Bindings : Blob, Cosmos DB, Event Grid, Event Hub, HTTP, Kafka, MySQL, Queue, ServiceBus, SQL, Timer, and Warmup
25
- - Triggers / Bindings : Custom binding support
26
-
27
- ### What's new?
28
-
29
- - [SDK Type Bindings for Blob](https://techcommunity.microsoft.com/t5/azure-compute-blog/azure-functions-sdk-type-bindings-for-azure-blob-storage-with/ba-p/4146744)
30
- - [HTTP Streaming](https://techcommunity.microsoft.com/t5/azure-compute-blog/azure-functions-support-for-http-streams-in-python-is-now-in/ba-p/4146697)
31
-
32
- ### Get Started
33
-
34
- - [Create your first Python function](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-python)
35
- - [Developer guide](https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python)
36
- - [Binding API reference](https://docs.microsoft.com/en-us/python/api/azure-functions/azure.functions?view=azure-python)
37
- - [Develop using VS Code](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-vs-code)
38
- - [Create a Python Function on Linux using a custom docker image](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-function-linux-custom-image)
39
-
40
- # Give Feedback
41
-
42
- Issues and feature requests are tracked in a variety of places. To report this feedback, please file an issue to the relevant repository below:
43
-
44
- | Item | Description | Link |
45
- |---------------|----------------------------------------------|--------------------------------------------------------------------------------|
46
- | Python Worker | Programming Model, Triggers & Bindings | [File an Issue](https://github.com/Azure/azure-functions-python-worker/issues) |
47
- | Runtime | Script Host & Language Extensibility | [File an Issue](https://github.com/Azure/azure-functions-host/issues) |
48
- | VSCode | VSCode Extension for Azure Functions | [File an Issue](https://github.com/microsoft/vscode-azurefunctions/issues) |
49
- | Core Tools | Command Line Interface for Local Development | [File an Issue](https://github.com/Azure/azure-functions-core-tools/issues) |
50
- | Templates | Code Issues with Creation Template | [File an Issue](https://github.com/Azure/azure-functions-templates/issues) |
51
-
52
- # Contribute
53
-
54
- This project welcomes contributions and suggestions. Most contributions require you to agree to a
55
- Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
56
- the rights to use your contribution. For details, visit https://cla.microsoft.com.
57
-
58
- Here are some pointers to get started:
59
-
60
- - [Language worker architecture](https://github.com/Azure/azure-functions-python-worker/wiki/Worker-Architecture)
61
- - [Setting up the development environment](https://github.com/Azure/azure-functions-python-worker/wiki/Contributor-Guide)
62
- - [Adding support for a new binding](https://github.com/Azure/azure-functions-python-worker/wiki/Adding-support-for-a-new-binding-type)
63
- - [Release instructions](https://github.com/Azure/azure-functions-python-worker/wiki/Release-Instructions)
64
-
65
- When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
66
- a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
67
- provided by the bot. You will only need to do this once across all repos using our CLA.
68
-
69
- This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
70
- For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
1
+ # <img src="https://raw.githubusercontent.com/Azure/azure-functions-python-worker/dev/docs/Azure.Functions.svg" width = "30" alt="Functions Header Image - Lightning Logo"> Azure Functions Python Worker
2
+
3
+ | Branch | Build Status | CodeCov | Test Status |
4
+ |--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
5
+ | dev | [![Build Status](https://img.shields.io/azure-devops/build/azfunc/public/658/dev)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=658&branchName=dev) | [![codecov](https://codecov.io/gh/Azure/azure-functions-python-worker/branch/dev/graph/badge.svg)](https://codecov.io/gh/Azure/azure-functions-python-worker) | [![Test Status](https://img.shields.io/azure-devops/build/azfunc/public/658/dev)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=658&branchName=dev) |
6
+
7
+ Python support for Azure Functions is based on Python 3.13 serverless hosting on Linux and the Functions 4.0 runtime.
8
+
9
+ Here is the current status of Python in Azure Functions:
10
+
11
+ What are the supported Python versions?
12
+
13
+ | Azure Functions Runtime | Python 3.13 |
14
+ |----------------------------------|-------------|
15
+ | Azure Functions 4.0 | ✔ |
16
+
17
+ For information about Azure Functions Runtime, please refer to [Azure Functions runtime versions overview](https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions) page.
18
+
19
+ ### What's available?
20
+
21
+ - Build, test, debug, and publish using Azure Functions Core Tools (CLI) or Visual Studio Code
22
+ - Deploy Python Function project onto consumption, dedicated, elastic premium, or flex consumption plan.
23
+ - Deploy Python Function project in a custom docker image onto dedicated or elastic premium plan.
24
+ - Triggers / Bindings : Blob, Cosmos DB, Event Grid, Event Hub, HTTP, Kafka, MySQL, Queue, ServiceBus, SQL, Timer, and Warmup
25
+ - Triggers / Bindings : Custom binding support
26
+
27
+ ### What's new?
28
+
29
+ - [SDK Type Bindings for Blob](https://techcommunity.microsoft.com/t5/azure-compute-blog/azure-functions-sdk-type-bindings-for-azure-blob-storage-with/ba-p/4146744)
30
+ - [HTTP Streaming](https://techcommunity.microsoft.com/t5/azure-compute-blog/azure-functions-support-for-http-streams-in-python-is-now-in/ba-p/4146697)
31
+
32
+ ### Get Started
33
+
34
+ - [Create your first Python function](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-python)
35
+ - [Developer guide](https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python)
36
+ - [Binding API reference](https://docs.microsoft.com/en-us/python/api/azure-functions/azure.functions?view=azure-python)
37
+ - [Develop using VS Code](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-vs-code)
38
+ - [Create a Python Function on Linux using a custom docker image](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-function-linux-custom-image)
39
+
40
+ # Give Feedback
41
+
42
+ Issues and feature requests are tracked in a variety of places. To report this feedback, please file an issue to the relevant repository below:
43
+
44
+ | Item | Description | Link |
45
+ |---------------|----------------------------------------------|--------------------------------------------------------------------------------|
46
+ | Python Worker | Programming Model, Triggers & Bindings | [File an Issue](https://github.com/Azure/azure-functions-python-worker/issues) |
47
+ | Runtime | Script Host & Language Extensibility | [File an Issue](https://github.com/Azure/azure-functions-host/issues) |
48
+ | VSCode | VSCode Extension for Azure Functions | [File an Issue](https://github.com/microsoft/vscode-azurefunctions/issues) |
49
+ | Core Tools | Command Line Interface for Local Development | [File an Issue](https://github.com/Azure/azure-functions-core-tools/issues) |
50
+ | Templates | Code Issues with Creation Template | [File an Issue](https://github.com/Azure/azure-functions-templates/issues) |
51
+
52
+ # Contribute
53
+
54
+ This project welcomes contributions and suggestions. Most contributions require you to agree to a
55
+ Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
56
+ the rights to use your contribution. For details, visit https://cla.microsoft.com.
57
+
58
+ Here are some pointers to get started:
59
+
60
+ - [Language worker architecture](https://github.com/Azure/azure-functions-python-worker/wiki/Worker-Architecture)
61
+ - [Setting up the development environment](https://github.com/Azure/azure-functions-python-worker/wiki/Contributor-Guide)
62
+ - [Adding support for a new binding](https://github.com/Azure/azure-functions-python-worker/wiki/Adding-support-for-a-new-binding-type)
63
+ - [Release instructions](https://github.com/Azure/azure-functions-python-worker/wiki/Release-Instructions)
64
+
65
+ When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
66
+ a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
67
+ provided by the bot. You will only need to do this once across all repos using our CLA.
68
+
69
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
70
+ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
71
71
  contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
@@ -1,13 +1,23 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
- from .handle_event import (worker_init_request,
4
- functions_metadata_request,
5
- function_environment_reload_request,
6
- invocation_request,
7
- function_load_request)
8
-
9
- __all__ = ('worker_init_request',
10
- 'functions_metadata_request',
11
- 'function_environment_reload_request',
12
- 'invocation_request',
13
- 'function_load_request')
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+ from .handle_event import (worker_init_request,
4
+ functions_metadata_request,
5
+ function_environment_reload_request,
6
+ invocation_request,
7
+ function_load_request)
8
+ from .utils.threadpool import (
9
+ start_threadpool_executor,
10
+ stop_threadpool_executor,
11
+ get_threadpool_executor,
12
+ )
13
+ from .utils.executor import invocation_id_cv
14
+
15
+ __all__ = ('worker_init_request',
16
+ 'functions_metadata_request',
17
+ 'function_environment_reload_request',
18
+ 'invocation_request',
19
+ 'function_load_request',
20
+ 'start_threadpool_executor',
21
+ 'stop_threadpool_executor',
22
+ 'get_threadpool_executor',
23
+ 'invocation_id_cv')
@@ -1,66 +1,69 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
- import threading
4
-
5
- from .retrycontext import RetryContext
6
- from .tracecontext import TraceContext
7
-
8
-
9
- class Context:
10
- def __init__(self,
11
- func_name: str,
12
- func_dir: str,
13
- invocation_id: str,
14
- thread_local_storage: threading.local,
15
- trace_context: TraceContext,
16
- retry_context: RetryContext) -> None:
17
- self.__func_name = func_name
18
- self.__func_dir = func_dir
19
- self.__invocation_id = invocation_id
20
- self.__thread_local_storage = thread_local_storage
21
- self.__trace_context = trace_context
22
- self.__retry_context = retry_context
23
-
24
- @property
25
- def invocation_id(self) -> str:
26
- return self.__invocation_id
27
-
28
- @property
29
- def thread_local_storage(self) -> threading.local:
30
- return self.__thread_local_storage
31
-
32
- @property
33
- def function_name(self) -> str:
34
- return self.__func_name
35
-
36
- @property
37
- def function_directory(self) -> str:
38
- return self.__func_dir
39
-
40
- @property
41
- def trace_context(self) -> TraceContext:
42
- return self.__trace_context
43
-
44
- @property
45
- def retry_context(self) -> RetryContext:
46
- return self.__retry_context
47
-
48
-
49
- def get_context(invoc_request, name: str,
50
- directory: str) -> Context:
51
- """ For more information refer:
52
- https://aka.ms/azfunc-invocation-context
53
- """
54
- trace_context = TraceContext(
55
- invoc_request.trace_context.trace_parent,
56
- invoc_request.trace_context.trace_state,
57
- invoc_request.trace_context.attributes)
58
-
59
- retry_context = RetryContext(
60
- invoc_request.retry_context.retry_count,
61
- invoc_request.retry_context.max_retry_count,
62
- invoc_request.retry_context.exception)
63
-
64
- return Context(
65
- name, directory, invoc_request.invocation_id,
66
- threading.local(), trace_context, retry_context)
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+ import threading
4
+
5
+ from .retrycontext import RetryContext
6
+ from .tracecontext import TraceContext
7
+
8
+
9
+ _invocation_id_local = threading.local()
10
+
11
+
12
+ class Context:
13
+ def __init__(self,
14
+ func_name: str,
15
+ func_dir: str,
16
+ invocation_id: str,
17
+ thread_local_storage: threading.local,
18
+ trace_context: TraceContext,
19
+ retry_context: RetryContext) -> None:
20
+ self.__func_name = func_name
21
+ self.__func_dir = func_dir
22
+ self.__invocation_id = invocation_id
23
+ self.__thread_local_storage = thread_local_storage
24
+ self.__trace_context = trace_context
25
+ self.__retry_context = retry_context
26
+
27
+ @property
28
+ def invocation_id(self) -> str:
29
+ return self.__invocation_id
30
+
31
+ @property
32
+ def thread_local_storage(self) -> threading.local:
33
+ return self.__thread_local_storage
34
+
35
+ @property
36
+ def function_name(self) -> str:
37
+ return self.__func_name
38
+
39
+ @property
40
+ def function_directory(self) -> str:
41
+ return self.__func_dir
42
+
43
+ @property
44
+ def trace_context(self) -> TraceContext:
45
+ return self.__trace_context
46
+
47
+ @property
48
+ def retry_context(self) -> RetryContext:
49
+ return self.__retry_context
50
+
51
+
52
+ def get_context(invoc_request, name: str,
53
+ directory: str) -> Context:
54
+ """ For more information refer:
55
+ https://aka.ms/azfunc-invocation-context
56
+ """
57
+ trace_context = TraceContext(
58
+ invoc_request.trace_context.trace_parent,
59
+ invoc_request.trace_context.trace_state,
60
+ invoc_request.trace_context.attributes)
61
+
62
+ retry_context = RetryContext(
63
+ invoc_request.retry_context.retry_count,
64
+ invoc_request.retry_context.max_retry_count,
65
+ invoc_request.retry_context.exception)
66
+
67
+ return Context(
68
+ name, directory, invoc_request.invocation_id,
69
+ _invocation_id_local, trace_context, retry_context)