‹ 首页

python-appservice-deploy

@microsoft · 收录于 6 天前 · 上游提交 今天

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应用需要部署到Azure App Service

/ 通过 npx 安装 校验哈希
npx oh-my-skill add microsoft/azure-skills/python-appservice-deploy
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- microsoft/azure-skills/python-appservice-deploy
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify microsoft/azure-skills/python-appservice-deploy
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
GitHub stars
~635最小装载
~8.1K含声明引用
~9.9K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 9cd2049 · 表述以原文为准
它做什么

安装此技能后,Claude 能将 Python 代码(Flask、Django、FastAPI 等)部署到 Azure App Service Linux。自动创建所需资源、检测框架、设置启动命令并部署,部署后不进行验证。

什么时候触发

当用户提到“Flask App Service”、“Django App Service”或“FastAPI App Service”等关键词时触发。

装好后可以这样说
Claude 会部署该 Flask 应用
触发部署 Django 应用
Claude 会部署指定的 Python 文件
技能原文 SKILL.md作者撰写 · MIT · 9cd2049

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 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 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](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.

按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。