Skip to content
Back to skills

Python Appservice Deploy

ASecurity

'Deploy Python (Flask/Django/FastAPI) code to Azure App Service

  • 81 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 20, 2026
ai-agentspythongoshellfastapidjangoflaskazureterraformapidatabase

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned September 20, 2026

npx -y skills add nota-america/forgecat-agent-profiles --skill python-appservice-deploy --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Appservice Deploy?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Appservice Deploy
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nota-america-python-appservice-deploy/badge)](https://www.skillsdirectory.com/skills/nota-america-python-appservice-deploy)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.

Files in this skill

  • SKILL.md2.7 KB
  • references/create-app.md6.1 KB
  • references/deploy-azcli.md4.7 KB
  • references/deploy-azd.md2.3 KB
  • references/detect.md3.6 KB
  • references/errors.md3.8 KB
  • references/post-deploy-message.md4.4 KB
  • references/startup-commands.md4.3 KB
  • references/transient-retry.md2.3 KB
  • scripts/generate-app-name.ps11.7 KB
  • scripts/generate-app-name.sh1.8 KB
  • scripts/retry-az-create.ps12.1 KB
  • scripts/retry-az-create.sh1.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…