Skip to content

Commit 7548971

Browse files
Merge pull request #276755 from shreyabatra4/shbatr/httpstreams
HTTP streams for Python small edits
2 parents 29ae0db + 37d353e commit 7548971

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ This feature makes it possible to handle large data stream, OpenAI integrations,
539539

540540
### Enable HTTP streams
541541

542-
HTTP streams are disabled by default. You need to enable this feature in your application settings and also update your code to use the FastAPI package.
542+
HTTP streams are disabled by default. You need to enable this feature in your application settings and also update your code to use the FastAPI package. Note that when enabling HTTP streams, the function app will default to using HTTP streaming, and the original HTTP functionality will not work.
543543

544544
1. Add the `azurefunctions-extensions-http-fastapi` extension package to the `requirements.txt` file in the project, which should include at least these packages:
545545

@@ -549,10 +549,13 @@ HTTP streams are disabled by default. You need to enable this feature in your ap
549549

550550
:::code language="python" source="~/functions-python-extensions/azurefunctions-extensions-http-fastapi/samples/fastapi_samples_streaming_download/function_app.py" range="8" :::
551551

552-
1. When you deploy to Azure, add these [application settings](./functions-how-to-use-azure-function-app-settings.md#settings) in your function app:
552+
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:
553553

554-
+ `"PYTHON_ISOLATE_WORKER_DEPENDENCIES": "1"`
555-
+ `"PYTHON_ENABLE_INIT_INDEXING": "1"`
554+
`"PYTHON_ENABLE_INIT_INDEXING": "1"`
555+
556+
If you are deploying to Linux Consumption, also add
557+
558+
`"PYTHON_ISOLATE_WORKER_DEPENDENCIES": "1"`
556559

557560
When running locally, you also need to add these same settings to the `local.settings.json` project file.
558561

0 commit comments

Comments
 (0)