microsoft/azure-skills · Official

python-appservice-deploy

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

All-time #260 Trending #199 First seen Jun 15, 2026
8-week activity · all time api

Installation

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

Summary

  • 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.

Security audits

Partner security reviews for this skill.

agent-trust-hub SAFE

Analyzed Jul 29, 2026

This skill provides a secure and structured workflow for deploying Python applications to Azure App Service using official Microsoft CLI tools. It incorporates security best practices, such as excluding sensitive environment files from deployment packages and providing guidance on shell-safe command execution. The inclusion of idempotent resource creation scripts and automated framework detection ensures a consistent and secure deployment process.

snyk LOW

Analyzed Jul 29, 2026

No issues detected.

socket Score 0.9000 · 0 alerts

Analyzed Jul 29, 2026

  • license 1
  • maintenance 1
  • quality 0.9
  • supply chain 1
  • vulnerability 1

0 alerts

Also in this package

Other skills from microsoft/azure-skills · top by installs.

npx skills add microsoft/azure-skills

Browse all from microsoft/azure-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 1.5K
License MIT
Default branch main
Open issues 9
Last push Sep 10, 2026
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.1.1
LicenseMIT
More metadata
author
Microsoft
version
1.1.1

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,787 B
  • docs SUMMARY.md 323 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 172,400 installs

SKILL.md

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: mcpazuremcpsubscriptionlist, mcpazuremcpgrouplist, mcpazuremcpappservice, mcpazuremcpazd (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 pathazure.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 SCMDOBUILDDURINGDEPLOYMENT=true.
  7. Deployazd 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.