Skip to main content
skill

python-appservice-deploy — Claude Code skill: how to install

Deploys Python web apps to Azure App Service Linux. It provisions missing plans and sets appropriate startup routines automatically.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add microsoft/skills --skill python-appservice-deploy -a claude-code
Open on GitHub

What python-appservice-deploy does

The skill provisions Python web services on a Linux P0v3 plan targeting the PYTHON:3.14 runtime. When the resource group or service plan is missing, it sets them up using names derived from the chosen app name (<app>-rg and <app>-plan). Only the application name triggers an interactive prompt; subscription and region default to current az settings or eastus2.

Deployment branches based on configuration: projects with an azure.yaml file use azd deploy, while others run through az webapp deploy --type zip. The tool assigns python -m uvicorn main:app --host 0.0.0.0 for FastAPI and enables SCM_DO_BUILD_DURING_DEPLOYMENT=true for remote builds. Running az webapp up is strictly disallowed. The workflow halts immediately after deployment without probing endpoints, since App Service takes 2 to 3 minutes to warm up. Tasks involving databases or infrastructure-as-code must be delegated to azure-prepare.

What it helps with

  • deploy a FastAPI backend to Azure App Service Linux with uvicorn startup
  • generate missing Azure resource groups and P0v3 plans without manual portal setup
  • configure remote dependency builds via SCM_DO_BUILD_DURING_DEPLOYMENT
  • push Flask or Django applications relying on Oryx autodetection

Example prompts for the agent

  • Deploy this FastAPI project to Azure App Service Linux.
  • Publish my Django application to Azure App Service.
  • Set up an Azure App Service web app for this Flask codebase.

How to install python-appservice-deploy

1Skills CLI (Vercel)

npx skills add microsoft/skills --skill python-appservice-deploy -a claude-code

2Manually: put the files in place

~/.claude/skills/python-appservice-deploy/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/python-appservice-deploy/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about python-appservice-deploy

How do I install python-appservice-deploy in Claude Code?

Run npx skills add microsoft/skills --skill python-appservice-deploy -a claude-code in your terminal. The configuration is stored at ~/.claude/skills/python-appservice-deploy/SKILL.md.

What does python-appservice-deploy do?

It automates shipping Python web apps to Azure App Service Linux, generating P0v3 plans, configuring the PYTHON:3.14 runtime, and setting execution commands.

Why does the skill avoid checking website health immediately after deployment?

The skill forbids health probes or log tailing right after completion because App Service requires 2 to 3 minutes to warm up before serving requests properly.

Source text

SKILL.md · MIT
---
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](references/create-app.md) §1.
2. **Detect framework** (advisory, never blocks). [detect.md](references/detect.md).
3. **Choose path** — `azure.yaml` host: appservice → [deploy-azd.md](references/deploy-azd.md); else [deploy-azcli.md](references/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](references/transient-retry.md). [create-app.md](references/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](references/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](references/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](references/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.

© Microsoft · MIT · microsoft/skills

Similar skills

All skills for Cloud: AWS, Azure, GCP →

From the same set242

The whole set →
agents This command creates AGENTS.md files in relevant repository folders, but only when they are missing. It gives coding agents project-specific build, test, structure, and code-style guidance. ★ 3,149repo stars wiki-writer Generates VitePress wiki pages with dark-mode Mermaid diagrams and links technical descriptions directly to source code lines. ★ 3,149repo stars wiki-researcher This subagent maps a codebase and traces data flows, integrations, and design choices with file-and-line evidence. Use it when you need a grounded account of how a project fits together. ★ 3,149repo stars wiki-architect Reads a codebase and lays out a hierarchical documentation catalogue, each item tied to a file and line. On request it adds four onboarding guides. ★ 3,149repo stars preset This skill checks Azure OpenAI capacity in the project’s region and looks elsewhere when needed. Use it to choose a model and deploy it. ★ 3,149repo stars customize Walks you through deploying an Azure OpenAI model step by step: version, SKU, capacity, RAI policy and advanced options. Useful when you need exact control over the config. ★ 3,149repo stars capacity Discovers Azure OpenAI model capacity and TPM limits across subscription regions. It helps you pick the right deployment target before provisioning. ★ 3,149repo stars deploy-model This skill routes Azure OpenAI requests to preset deployment, custom configuration, or capacity discovery. Use it to check where a model can be deployed before choosing settings. ★ 3,149repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor