PluginBench
Skill
Pass
Audit score 90

python-appservice-deploy

microsoft/azure-skills

Deploy Python web apps (Flask/Django/FastAPI) to Azure App Service Linux with minimal configuration.

What is python-appservice-deploy?

Deploys Python code to Azure App Service Linux, automatically creating resource groups, app service plans, and web apps as needed. Use this when deploying Flask, Django, or FastAPI applications to App Service; hand off to azure-prepare for infrastructure, databases, or IaC.

  • Automatically detects Python framework (Flask, Django, FastAPI) and configures startup commands
  • Creates or reuses Azure resource group, app service plan (P0v3), and web app with Python 3.14 runtime
  • Deploys code via zip upload or Azure Developer CLI (azd) if azure.yaml is present
  • Sets required environment variables (SCM_DO_BUILD_DURING_DEPLOYMENT=true) for build-during-deployment
  • Handles transient ARM errors with retry logic
  • Resolves subscription, region, and naming with smart defaults to minimize prompts

How to install python-appservice-deploy

npx skills add https://github.com/microsoft/azure-skills --skill python-appservice-deploy
Prerequisites
  • Azure CLI (az) installed and authenticated
  • Python 3.14 runtime available in target region
  • Existing Azure subscription with permissions to create resources
  • For azd path: azure.yaml file in project root with appservice host configuration
Claude Code
Cursor
Windsurf
Cline

How to use python-appservice-deploy

  1. 1.Provide the application name when prompted (resource group, plan, and region auto-derive)
  2. 2.Skill detects your Python framework (Flask, Django, FastAPI) automatically
  3. 3.If azure.yaml exists with appservice host, deployment uses azd deploy; otherwise uses az webapp deploy
  4. 4.Verify startup command is correct for your framework (FastAPI requires python -m uvicorn main:app --host 0.0.0.0)
  5. 5.Wait 2–3 minutes for App Service to warm up; do not check logs or health immediately after deployment completes

Use cases

Good for
  • Deploy a Flask REST API to App Service without manually creating infrastructure
  • Push a Django application to Azure with automatic framework detection and startup configuration
  • Deploy a FastAPI service with uvicorn startup command automatically configured
  • Migrate an existing Python web app from local development to App Service Linux
  • Redeploy updated Python code to an existing App Service instance
Who it's for
  • Python developers deploying to Azure App Service
  • DevOps engineers automating Flask/Django/FastAPI deployments
  • Teams using Azure Developer CLI (azd) for Python app deployment
  • Developers who need quick Python web app hosting without infrastructure-as-code

python-appservice-deploy FAQ

What happens if my resource group or app service plan doesn't exist?

The skill automatically creates them with sensible defaults: resource group named <app>-rg, plan named <app>-plan, region from your az CLI default or eastus2.

Do I need to configure startup commands manually?

No. Flask and Django are auto-detected by Oryx. FastAPI automatically gets python -m uvicorn main:app --host 0.0.0.0. Other frameworks show a warning.

Can I use this for Container Apps, Functions, or Infrastructure as Code?

No. This skill is for App Service only. Use azure-prepare for VNet, Key Vault, databases, Terraform, Bicep, or Container Apps.

Why shouldn't I check logs or curl the app immediately after deployment?

App Service needs 2–3 minutes to warm up. Early 5xx errors or quiet logs do not indicate failure; wait before investigating.

What if deployment fails with an ARM error?

The skill retries transient errors automatically. For persistent failures, check errors.md in the skill references for symptom-to-fix guidance.

Full instructions (SKILL.md)

Source of truth, from microsoft/azure-skills.


name: python-appservice-deploy description: "Deploy Python (Flask/Django/FastAPI) code to Azure App Service Linux. WHEN: "Flask App Service", "Django App Service", "FastAPI App Service", "deploy Python to App Service". DO NOT USE FOR: Container Apps, Functions, non-Python, Terraform/Bicep/IaC, full infra — use azure-prepare." license: MIT metadata: author: Microsoft version: "1.1.1"

Python on Azure App Service — Code Deploy

Deploys Python (Flask, Django, FastAPI, generic) code to Azure App Service Linux (P0v3, Python 3.14). Creates RG + Plan + Web App if missing. Hand off to azure-prepare for VNet, Key Vault, databases, or IaC.

MCP tools used: mcp_azure_mcp_subscription_list, mcp_azure_mcp_group_list, mcp_azure_mcp_appservice, mcp_azure_mcp_azd (when azure.yaml is present).

Workflow

  1. Resolve context — smart defaults, minimal prompts. Only the app name is interactive; RG (<app>-rg), Plan (<app>-plan), region (current az default or eastus2), subscription are derived. create-app.md §1.
  2. Detect framework (advisory, never blocks). detect.md.
  3. Choose path — azure.yaml host: appservice → deploy-azd.md; else deploy-azcli.md.
  4. Ensure RG → Plan (P0v3 --is-linux) → Web App (--runtime "PYTHON:3.14") exist. On transient ARM errors, follow transient-retry.md. create-app.md.
  5. Set startup — Flask/Django: none (Oryx auto-detects). FastAPI: always python -m uvicorn main:app --host 0.0.0.0. Other: warn. startup-commands.md.
  6. Set SCM_DO_BUILD_DURING_DEPLOYMENT=true.
  7. Deploy — azd deploy or az webapp deploy --type zip --track-status false.
  8. STOP. Print the post-deploy message (post-deploy-message.md) and end the turn.

Hard rules

  • ⛔ NO POST-DEPLOY VERIFICATION — after deploy returns, do not run az webapp log tail, curl, Invoke-WebRequest, or any health probe. App Service needs 2–3 min to warm; a quiet log or early 5xx is not failure.
  • ⛔ SHELL SAFETY — for --runtime always use "PYTHON:3.14" (colon). Never "PYTHON|3.14" (pipe is a shell operator).
  • ⛔ NEVER az webapp up — deprecated. Use Step 7 commands.
  • ✅ URL FORMAT — present endpoints as https://... URLs.

Error Handling

See errors.md for the full symptom → cause → fix matrix. Quick triage: missing plan/app → re-run Step 4; container ping timeout on 8000 → fix startup (Step 5); ModuleNotFoundError after deploy → ensure Step 6 ran, redeploy.