pythonazureazure-devopsazure-functionsfastapi

Trouble Deploying FastAPI Project on Azure Functions or testing locally


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 startor func host start. I get a respond like the following. enter image description here

and when I try to to deploy it to azure I don't have the WrapperFunction under Local Project

enter image description here


Solution

  • Initially, I was not able to see the functions or run the function locally:

    enter image description here

    To make it work, create a new environment:

    enter image description here enter image description here

    Open Terminal, run pip install requirements.txt:

    enter image description here

    Run the function locally using the command func host start:

    enter image description here

    enter image description here

    enter image description here

    enter image description here