🎯

python-appservice-deploy

🎯Skill

Puts your Python web app (Flask, Django, or FastAPI) online on Azure App Service, Microsoft's hosting service, with as few questions as possible. It creates the Azure resources you need if they do not exist yet.

microsoft/azure-skills361,450 InstallsAdded Jun 18, 2026

Installation

$npx skills add microsoft/azure-skills --skill python-appservice-deploy

Run it in a terminal; it asks which AI coding tools to install it for (Claude Code, Codex, Cursor and more).

Uses skills.sh Β· Node.js 22.20+

After installing

Ask for related work and the agent uses it on its own, or call it yourself.

Run it (Claude Code)/python-appservice-deploy
Install by hand

Copy the whole skill folder from GitHub to the place below. Copying only SKILL.md can leave out files the skill uses.

Open the skill folder β†’
  • This project .claude/skills/python-appservice-deploy/
  • All projects ~/.claude/skills/python-appservice-deploy/

These paths are for Claude Code. For other tools, the command above puts it in the right place.

What this skill does

Overview

This skill deploys, or puts online, your Python code on Azure App Service on Linux, using Python 3.14 and a P0v3 plan (the server size and price tier). It only asks for your app name, then picks the resource group (a folder for Azure resources), plan, region, and subscription for you. If your project has an azure.yaml file, it deploys with azd deploy, and otherwise it uses az webapp deploy.

Key Features

  • Create the resource group, App Service plan, and web app if they are missing, after checking your Azure quota (how much your account can create) with azure-quotas.
  • Detect whether the project uses Flask, Django, or FastAPI, and set the right start command, such as python -m uvicorn main:app --host 0.0.0.0 for FastAPI.
  • Convert line endings in shell and startup scripts to the Linux format, and check Django static file settings before packaging.
  • Turn on the build step on the server so your Python packages install during deployment.
  • Use a list of common errors and fixes, such as a startup timeout or ModuleNotFoundError after deployment.

Who is this for?

It fits Python developers who want to put a Flask, Django, or FastAPI app on Azure without writing infrastructure templates. If you need a private network, Key Vault for secrets, databases, or infrastructure as code (server setup written as files), the skill hands the work to azure-prepare instead.

Summarized by AI from this skill's SKILL.md. Suggest a better one

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.

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

Prerequisite: Verify the latest stable Azure CLI; update with approval and recheck if needed.

  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. Before creating a plan, invoke azure-quotas to check quota availability. 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 --enriched-errors true.
  8. STOP. Print the post-deploy message (post-deploy-message.md) and end the turn.

Hard rules

  • LINUX SCRIPTS β€” normalize selected shell/startup files to LF, then verify no CR bytes remain. Stop on normalization, validation or packaging failure; deploy only a fresh package.
  • DJANGO REMOTE BUILDS β€” require STATIC_ROOT and successful system/collectstatic checks before packaging.
  • β›” 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.

More from this repository10

🎯
microsoft-foundry🎯Skill

Helps you build, deploy, test, and manage AI agents and models on Microsoft Foundry, Microsoft's Azure service for AI. It guides the AI through each task with fixed steps.

🎯
azure-diagnostics🎯Skill

Helps you find and fix problems in apps running on Azure, such as crashes, slow responses, or connection failures. It checks things in a set order and can work only from logs you provide.

🎯
azure-prepare🎯Skill

azure-prepare gets a new or existing app ready to deploy to Azure with azd, Microsoft's command-line tool for Azure. It first writes a plan for your approval, then creates the setup files.

🎯
azure-deploy🎯Skill

azure-deploy puts your app on Azure after the azure-prepare and azure-validate skills have prepared and checked it. It runs the deployment, recovers from errors, and gives you the live web addresses.

🎯
azure-validate🎯Skill

azure-validate checks your Azure app before you deploy it, so you can catch setup and permission problems early. It runs after azure-prepare and before azure-deploy.

🎯
azure-resource-lookup🎯Skill

azure-resource-lookup finds and lists your Azure resources, such as web apps, virtual machines, and storage accounts, across your subscriptions. It only reads data and never changes anything.

🎯
azure-resource-visualizer🎯Skill

azure-resource-visualizer draws a diagram of an Azure resource group that shows how each resource connects to the others. It saves the diagram and notes in a markdown file.

🎯
azure-kusto🎯Skill

Lets Claude search and summarize large amounts of logs and app data stored in Azure Data Explorer. You ask what you want to know, and it writes and runs the queries for you.

🎯
azure-aigateway🎯Skill

Helps you send all requests to your AI models and tools through Azure API Management, so you can control cost, block harmful content and limit traffic. It includes Azure command-line steps for setup and testing.

🎯
azure-messaging🎯Skill

Helps you find and fix errors in apps that send and receive messages through Azure Event Hubs or Service Bus. It checks service health and Microsoft docs to suggest a fix.