I'm working on a Python FastAPI project and I'm trying to deploy it using Azure Functions. I came across this repository fastapi-on-azure-functions which provides a guide on how to accomplish this.
While the documentation states that it's a simple example code, I couldn't Test it locally or deploy it to azure.
After creating a Python virtual environment and activating it. I installed the requirements as stated in the documentation. But when I run func start
or func host start
. I get a respond like the following.
and when I try to to deploy it to azure I don't have the WrapperFunction
under Local Project
Initially, I was not able to see the functions or run the function locally:
To make it work, create a new environment:
Open Terminal, run pip install requirements.txt
:
Run the function locally using the command func host start
: