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
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-reference-python.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -523,7 +523,9 @@ You can view other SDK type bindings samples for Blob storage in the Python exte
523
523
524
524
HTTP streams lets you accept and return data from your HTTP endpoints using FastAPI request and response APIs enabled in your functions. These APIs lets the host process large data in HTTP messages as chunks instead of reading an entire message into memory.
525
525
526
-
This feature makes it possible to handle large data stream, OpenAI integrations, deliver dynamic content, and support other core HTTP scenarios requiring real-time interactions over HTTP. You can also use FastAPI response types with HTTP streams. Without HTTP streams, the size of your HTTP requests and responses are limited by memory restrictions that can be encountered when processing entire message payloads all in memory.
526
+
This feature makes it possible to handle large data stream, OpenAI integrations, deliver dynamic content, and support other core HTTP scenarios requiring real-time interactions over HTTP. You can also use FastAPI response types with HTTP streams. Without HTTP streams, the size of your HTTP requests and responses are limited by memory restrictions that can be encountered when processing entire message payloads all in memory.
527
+
528
+
Note that when enabling HTTP streams, the function app will default to using HTTP streaming, and the original HTTP functionality will not work.
527
529
::: zone pivot="python-mode-configuration"
528
530
> [!IMPORTANT]
529
531
> Support for HTTP streams requires the [Python v2 programming model](functions-reference-python.md?pivots=python-mode-decorators#http-streams-preview).
@@ -549,10 +551,13 @@ HTTP streams are disabled by default. You need to enable this feature in your ap
1. When you deploy to Azure, add these [application settings](./functions-how-to-use-azure-function-app-settings.md#settings) in your function app:
554
+
1. When you deploy to Azure, add the following [application setting](./functions-how-to-use-azure-function-app-settings.md#settings) in your function app:
555
+
556
+
`"PYTHON_ISOLATE_WORKER_DEPENDENCIES": "1"`
557
+
558
+
If you are deploying to Linux Consumption, also add
553
559
554
-
+`"PYTHON_ISOLATE_WORKER_DEPENDENCIES": "1"`
555
-
+`"PYTHON_ENABLE_INIT_INDEXING": "1"`
560
+
`"PYTHON_ENABLE_INIT_INDEXING": "1"`
556
561
557
562
When running locally, you also need to add these same settings to the `local.settings.json` project file.
0 commit comments