An Azure service that provides an event-driven serverless compute platform.
Hi @sanjay baskaran ,
Thanks for reaching out to Microsoft Q&A.
You are running into a known Azure Functions limitation: Python isn’t supported on Windows-based function apps (even in Consumption), so you won’t see “Python” in the runtime drop-down when you pick the Consumption (Windows) plan. To host Python you need a Linux-based Function App.
You have two easy ways to get there on your free subscription:
- Portal approach
- Go to Create > Function App
- On the Basics tab change Operating system from Windows to Linux
- You’ll now see Python in the Runtime stack picklist
- Finish the wizard with Consumption plan selected (you still get the 1 M free executions/month)
- CLI approach If you prefer a one-liner, just run in Cloud Shell or your local Azure CLI:
That spins up a Linux Consumption plan Function App with Python support.az functionapp create \ --resource-group myResourceGroup \ --consumption-plan-location <your-region> \ --name myPythonFuncApp \ --storage-account myStorageAccount \ --runtime python \ --runtime-version 3.9 \ --os-type Linux
References:
- Creating functions from scratch
- Create a function app in the portal
- Create your first Python function
- CLI quickstart for serverless Python
- VS Code quickstart (Linux + Python)
Hope this helps!
If the resolution was helpful, kindly take a moment to click on and click on Yes for was this answer helpful. And, if you have any further query do let us know.