This sample shows a simple Azure Function in Python to start with.
func init --python
func new --name HttpExample --template "HTTP trigger" --authlevel "anonymous"
Use the following command to start the function in your environment.
func start
Ready to deploy to Azure?
region=westeurope
resourcegroup=functionspy
storageaccount=functionspysa
pythonversion=3.11
functionapp=functionspyfa
az group create --name $resourcegroup --location $region
az storage account create --name $storageaccount --location $region --resource-group $resourcegroup
az functionapp create --resource-group $resourcegroup --consumption-plan-location westeurope --runtime python --runtime-version $pythonversion --functions-version 4 --name $functionapp --os-type linux --storage-account $storageaccount
func azure functionapp publish $functionapp