python-appservice-deploy

Deploy Flask, Django, and FastAPI code to Azure App Service Linux.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/merceralex397-collab/alex-stack --skill python-appservice-deploy-merceralex397-collab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: python-appservice-deploy
Source: https://github.com/merceralex397-collab/alex-stack/tree/main/dev/azure-profile/azure-skills-main/azure-skills-main/.github/plugins/azure-skills/skills/python-appservice-deploy
Command: npx skills add https://github.com/merceralex397-collab/alex-stack --skill python-appservice-deploy-merceralex397-collab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Deploying Python web apps to Azure App Service involves many error-prone steps: creating resource groups, plans, and web apps, choosing the right runtime syntax, configuring startup commands per framework, and avoiding deprecated commands like az webapp up. This Skill automates the entire code-deploy workflow with correct defaults and guardrails. ## Core Features & Use Cases - End-to-end deployment workflow: Creates the resource group, Linux P0v3 App Service Plan, and Python 3.14 web app if missing, then deploys via az webapp deploy or azd deploy when an azure.yaml targets App Service. - Framework-aware startup configuration: Detects Flask, Django, and FastAPI from dependencies; skips startup commands for Flask/Django (Oryx auto-detects) and always sets the uvicorn command for FastAPI. - Resilient resource creation: Includes retry wrapper scripts for transient ARM errors (429/5xx, connection resets) and enforces shell-safe runtime syntax (PYTHON:3.14, never the pipe form). - Use Case: A developer with a FastAPI project asks to deploy it to Azure; the Skill derives names, creates the infrastructure, sets the uvicorn startup command, deploys the zip, and prints the app URL with warm-up expectations. ## Quick Start Deploy my Flask app in this folder to Azure App Service and give me the URL when it finishes.

Frequently Asked Questions about python-appservice-deploy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a Flask or Django app to Azure App Service?▼

Create a Linux App Service Plan and a web app with the Python runtime, set SCM_DO_BUILD_DURING_DEPLOYMENT=true, then run az webapp deploy with a zip of your code. Flask and Django need no startup command because Oryx auto-detects them.

How do I deploy FastAPI to Azure App Service?▼

FastAPI requires an explicit startup command: python -m uvicorn main:app --host 0.0.0.0, set via az webapp config set --startup-file. The --host 0.0.0.0 flag is mandatory because uvicorn defaults to 127.0.0.1, which causes container ping timeouts.

Why does my App Service container fail with ping timeouts on port 8000?▼

This usually means a wrong or missing startup command, or the app binding to 127.0.0.1 instead of 0.0.0.0. Set a startup command that binds to 0.0.0.0 and verify your entry point module and callable names are correct.

Should I use az webapp up or az webapp deploy for Python apps?▼

Use az webapp deploy with --type zip; az webapp up is deprecated. The explicit flow is az webapp create with --runtime "PYTHON:3.14" followed by az webapp deploy, which gives you control over the plan, runtime, and build settings.

When should I use azd instead of az CLI for App Service deployment?▼

Use azd deploy when the workspace has an azure.yaml whose service host is appservice. If azure.yaml targets Container Apps or Functions, or no azure.yaml exists, use the az CLI path with az webapp deploy instead.

What are the limitations of this App Service deployment approach?▼

It covers code deployment only, not infrastructure concerns like VNet integration, Key Vault references, databases, or Bicep/Terraform-managed environments. Those scenarios should be handed off to a full infrastructure provisioning workflow such as azure-prepare.