Agent Skillsmicrosoft/azure-skills › python-appservice-deploy

python-appservice-deploy

GitHub

将 Python (Flask/Django/FastAPI) 代码部署到 Azure App Service Linux。自动创建资源组、计划和应用服务,根据框架和配置文件选择 azd 或 az cli 进行部署,并配置启动命令。

skills/python-appservice-deploy/SKILL.md microsoft/azure-skills

Trigger Scenarios

Flask App Service Django App Service FastAPI App Service deploy Python to App Service

Install

npx skills add microsoft/azure-skills --skill python-appservice-deploy -g -y
More Options

Use without installing

npx skills use microsoft/azure-skills@python-appservice-deploy

指定 Agent (Claude Code)

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

安装 repo 全部 skill

npx skills add microsoft/azure-skills --all -g -y

预览 repo 内 skill

npx skills add microsoft/azure-skills --list

SKILL.md

Frontmatter
{
    "name": "python-appservice-deploy",
    "license": "MIT",
    "metadata": {
        "author": "Microsoft",
        "version": "1.1.1"
    },
    "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."
}

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 pathazure.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. Deployazd 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.

Version History

  • ea76537 Current 2026-08-20 03:59
  • 013b97d 2026-07-25 09:46

Same Skill Collection

.github/plugins/azure-kusto-graph-skills/skills/azure-kusto-irql/SKILL.md
.github/plugins/azure-skills/skills/airunway-aks-setup/SKILL.md
.github/plugins/azure-skills/skills/appinsights-instrumentation/SKILL.md
.github/plugins/azure-skills/skills/azure-ai/SKILL.md
.github/plugins/azure-skills/skills/azure-aigateway/SKILL.md
.github/plugins/azure-skills/skills/azure-cloud-migrate/SKILL.md
.github/plugins/azure-skills/skills/azure-compliance/SKILL.md
.github/plugins/azure-skills/skills/azure-cost/SKILL.md
.github/plugins/azure-skills/skills/azure-kusto/SKILL.md
.github/plugins/azure-skills/skills/azure-quotas/SKILL.md
.github/plugins/azure-skills/skills/azure-resource-visualizer/SKILL.md
.github/plugins/azure-skills/skills/azure-upgrade/SKILL.md
.github/plugins/azure-skills/skills/entra-app-registration/SKILL.md
.github/plugins/azure-skills/skills/python-appservice-deploy/SKILL.md
skills/airunway-aks-setup/SKILL.md
skills/appinsights-instrumentation/SKILL.md
skills/azure-ai/SKILL.md
skills/azure-aigateway/SKILL.md
skills/azure-cloud-migrate/SKILL.md
skills/azure-compliance/SKILL.md
skills/azure-cost/SKILL.md
skills/azure-kubernetes/azure-kubernetes-automatic-readiness/SKILL.md
skills/azure-kusto/SKILL.md
skills/azure-quotas/SKILL.md
skills/azure-resource-visualizer/SKILL.md
skills/azure-upgrade/SKILL.md
skills/entra-app-registration/SKILL.md
.github/plugins/azure-kusto-graph-skills/skills/azure-kusto-graph/SKILL.md
.github/plugins/azure-kusto-graph-skills/skills/azure-kusto-irql-graph/SKILL.md
.github/plugins/azure-skills/skills/azure-app-onboard-prereq/SKILL.md
.github/plugins/azure-skills/skills/azure-app-onboard/SKILL.md
.github/plugins/azure-skills/skills/azure-compute/SKILL.md
.github/plugins/azure-skills/skills/azure-deploy/SKILL.md
.github/plugins/azure-skills/skills/azure-diagnostics/SKILL.md
.github/plugins/azure-skills/skills/azure-enterprise-infra-planner/SKILL.md
.github/plugins/azure-skills/skills/azure-kubernetes/SKILL.md
.github/plugins/azure-skills/skills/azure-messaging/SKILL.md
.github/plugins/azure-skills/skills/azure-prepare/SKILL.md
.github/plugins/azure-skills/skills/azure-reliability/SKILL.md
.github/plugins/azure-skills/skills/azure-resource-lookup/SKILL.md
.github/plugins/azure-skills/skills/azure-storage/SKILL.md
.github/plugins/azure-skills/skills/azure-validate/SKILL.md
.github/plugins/azure-skills/skills/entra-agent-id/SKILL.md
.github/plugins/azure-skills/skills/microsoft-foundry/SKILL.md
skills/azure-app-onboard-prereq/SKILL.md
skills/azure-app-onboard/SKILL.md
skills/azure-compute/SKILL.md
skills/azure-deploy/SKILL.md
skills/azure-diagnostics/SKILL.md

Metadata

Files
0
Version
ea76537
Hash
17a26399
Indexed
2026-07-25 09:46

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 05:03
浙ICP备14020137号-1 $mapa de visitantes$