microsoft/python-appservice-deploy

Implanta código Python (Flask/Django/FastAPI) no Azure App Service Linux. USE QUANDO: "Flask App Service", "Django App Service", "FastAPI App Service", "implantar Python no App Service". NÃO USE PARA: Container Apps, Functions, código não-Python, Terraform/Bicep/IaC, infraestrutura completa — use azure-prepare.

O que é python-appservice-deploy?

Este skill é especializado na implantação de aplicações Python (Flask, Django, FastAPI ou genéricas) no Azure App Service Linux, utilizando o runtime Python 3.14 e planos P0v3. Ele automatiza a criação de grupo de recursos, plano de serviço e aplicativo web, quando necessário, e oferece dois caminhos de implantação: via `azd` (quando um arquivo `azure.yaml` está presente) ou via CLI do Azure (`az webapp deploy`). O skill também detecta o framework da aplicação para configurar comandos de inicialização apropriados e define a variável `SCM_DO_BUILD_DURING_DEPLOYMENT=true` para garantir a construção durante a implantação. Importante: ele deliberadamente não realiza verificação pós-implantação (health probes ou logs) para evitar falsos positivos devido ao tempo de aquecimento do App Service. As ferramentas MCP utilizadas incluem `mcp_azure_mcp_subscription_list`, `mcp_azure_mcp_group_list`, `mcp_azure_mcp_appservice` e `mcp_azure_mcp_azd`. Não deve ser usado para implantações em Container Apps, Functions, código não-Python ou provisionamento completo de infraestrutura (isso é responsabilidade do skill `azure-prepare`). Regras críticas incluem nunca usar `az webapp up` (depreciado) e garantir a sintaxe correta do runtime (`"PYTHON:3.14"` com dois pontos, não pipe).

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/microsoft/azure-skills/tree/main/skills/python-appservice-deploy

Installed? Explore more Programação e Desenvolvimento skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

Python no Azure App Service — Implantação de Código

Implanta código Python (Flask, Django, FastAPI, genérico) no Azure App Service Linux (P0v3, Python 3.14). Cria RG, Plano e Aplicativo Web se estiverem ausentes. Encaminhe para azure-prepare para VNet, Key Vault, bancos de dados ou IaC.

Ferramentas MCP utilizadas: mcp_azure_mcp_subscription_list, mcp_azure_mcp_group_list, mcp_azure_mcp_appservice, mcp_azure_mcp_azd (quando azure.yaml está presente).

Fluxo de Trabalho

  1. Resolver contexto — padrões inteligentes, poucos prompts. Apenas o nome do aplicativo é interativo; RG (<app>-rg), Plano (<app>-plan), região (padrão az atual ou eastus2), assinatura são derivados. create-app.md §1.
  2. Detectar framework (informativo, nunca bloqueia). detect.md.
  3. Escolher caminho — host azure.yaml: appservice → deploy-azd.md; senão deploy-azcli.md.
  4. Garantir que RG → Plano (P0v3 --is-linux) → Aplicativo Web (--runtime "PYTHON:3.14") existam. Em erros ARM transitórios, siga transient-retry.md. create-app.md.
  5. Definir inicialização — Flask/Django: nenhum (Oryx detecta automaticamente). FastAPI: sempre python -m uvicorn main:app --host 0.0.0.0. Outros: avisar. startup-commands.md.
  6. Definir SCM_DO_BUILD_DURING_DEPLOYMENT=true.
  7. Implantar — azd deploy ou az webapp deploy --type zip --track-status false.
  8. PARAR. Exibir a mensagem pós-implantação (post-deploy-message.md) e encerrar a interação.

Regras rígidas

  • ⛔ NENHUMA VERIFICAÇÃO PÓS-IMPLANTAÇÃO — após a implantação retornar, não execute az webapp log tail, curl, Invoke-WebRequest ou qualquer teste de integridade. O App Service precisa de 2–3 minutos para aquecer; um log silencioso ou 5xx inicial não é falha.
  • ⛔ SEGURANÇA DE SHELL — para --runtime sempre use "PYTHON:3.14" (com dois pontos). Nunca "PYTHON|3.14" (pipe é um operador de shell).
  • ⛔ NUNCA USE az webapp up — depreciado. Use os comandos do Passo 7.
  • ✅ FORMATO DE URL — apresente endpoints como URLs https://....

Tratamento de Erros

Consulte errors.md para a matriz completa de sintoma → causa → correção. Triagem rápida: plano/app ausente → reexecutar Passo 4; timeout de ping no container na porta 8000 → corrigir inicialização (Passo 5); ModuleNotFoundError após implantação → garantir que o Passo 6 foi executado, reimplantar.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

microsoft/airunway-aks-setup

Agent skill 'airunway-aks-setup' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/appinsights-instrumentation

Agent skill 'appinsights-instrumentation' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-ai

Agent skill 'azure-ai' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-aigateway

Agent skill 'azure-aigateway' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-app-onboard

Agent skill 'azure-app-onboard' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-app-onboard-prereq

Assess whether source code is ready to deploy to Azure — the check BEFORE infrastructure work. Evaluates build health, app completeness, dependencies and local services, stack compatibility, and deployment feasibility. Answers questions about what your app needs before it can be deployed — frameworks, dependencies, and configuration. Checks whether dependencies are compatible and identifies deployment blockers and unsupported frameworks. WHEN: \"evaluate my repo\", \"is my app ready to deploy\", \"what does my app need to deploy\", \"what do I need before deploying\", \"does my app need\", \"can I ship this to Azure\", \"scan my repo for issues\", \"is this app deployable\", \"check if my app is ready for Azure\", \"do I need a Dockerfile\", \"what's blocking my deployment\", \"are there any blockers\", \"are my dependencies compatible\", \"does Azure support my framework\", \"what needs to change before deploying\", \"check my app configuration\".

microsoft/azure-cloud-migrate

Agent skill 'azure-cloud-migrate' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-compliance

Agent skill 'azure-compliance' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-compute

Agent skill 'azure-compute' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-cost

Agent skill 'azure-cost' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-cost-optimization

Identify Azure cost savings from usage and spending data. USE FOR: optimize Azure costs, reduce Azure spending/expenses, analyze Azure costs, find cost savings, generate cost optimization report, identify orphaned resources to delete, rightsize VMs, reduce waste, optimize Redis costs, optimize storage costs, AKS cost analysis add-on, namespace cost, cost spike, anomaly, budget alert, AKS cost visibility. DO NOT USE FOR: deploying resources (use azure-deploy), general Azure diagnostics (use azure-diagnostics), security issues (use azure-security)

microsoft/azure-deploy

Agent skill 'azure-deploy' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-diagnostics

Agent skill 'azure-diagnostics' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-enterprise-infra-planner

Agent skill 'azure-enterprise-infra-planner' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-hosted-copilot-sdk

Build, deploy, and modify GitHub Copilot SDK apps on Azure. MANDATORY when codebase contains @github/copilot-sdk or CopilotClient in package.json. PREFER OVER azure-prepare when copilot-sdk markers detected. WHEN: copilot SDK, @github/copilot-sdk, copilot-powered app, build copilot app, prepare copilot app, add feature to copilot app, modify copilot app, BYOM, bring your own model, CopilotClient, createSession, sendAndWait, azd init copilot. DO NOT USE FOR: deploying already-prepared copilot-sdk apps (use azure-deploy), general web apps without copilot SDK (use azure-prepare), Copilot Extensions, Foundry agents (use microsoft-foundry).

microsoft/azure-kubernetes

Agent skill 'azure-kubernetes' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-kusto

Agent skill 'azure-kusto' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-messaging

Agent skill 'azure-messaging' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-observability

Azure Observability Services including Azure Monitor, Application Insights, Log Analytics, Alerts, and Workbooks. Provides metrics, APM, distributed tracing, KQL queries, and interactive reports. USE FOR: Azure Monitor, Application Insights, Log Analytics, Alerts, Workbooks, metrics, APM, distributed tracing, KQL queries, interactive reports, observability, monitoring dashboards. DO NOT USE FOR: instrumenting apps with App Insights SDK (use appinsights-instrumentation), querying Kusto/ADX clusters (use azure-kusto), cost analysis (use azure-cost-optimization).

microsoft/azure-postgres

azure-postgres — an installable skill for AI agents.

Habilidades Relacionadas