FastApi Python worker extension for Azure Functions.
Low maintenance activity. Last release 16 months ago. Weaker on commit activity and recent releases.
pip install azurefunctions-extensions-http-fastapiAzure Functions Extensions Http FastApi library for Python
This library contains HttpV2 extensions for FastApi Request/Response types to use in your function app code.
Source code | Package (PyPi) | Developer Reference | Samples
Getting started
Prerequisites
- Python 3.8 or later is required to use this package. For more details, please read our page on Python Functions version support policy.
Instructions
- Follow the guide to create an app. If you're testing the function locally, make sure to update to the latest version of Core Tools.
- Ensure your app is using programming model v2 and contains an HttpTrigger function.
- Add
azurefunctions-extensions-http-fastapito your requirements.txt - Import Request and different types of responses from
azurefunctions.extensions.http.fastapiin your HttpTrigger functions. - Change the request and response types to ones imported from
azurefunctions.extensions.http.fastapi. - Add
"PYTHON_ENABLE_INIT_INDEXING": "1"to your local.settings.json file or App Settings. - Run your function app and try it out!
Bind to the FastApi type
The Azure Functions Extensions HTTP FastApi library for Python allows you to create a function app with FastApi Request or Response types. When your function runs, you will receive the FastApi Request type, and you can return a FastApi Response type.
FastApi is one of the top Python web frameworks that provides elegant and powerful Request/Response types and functionalities. With this integration, you are empowered to use Request/Response types the same way as with native FastApi. For example, HTTP streaming upload and download scenarios are now possible! Please reference the for further information.