microsoft/python-appservice-deploy

Déploie du code Python (Flask/Django/FastAPI) sur Azure App Service Linux. Utiliser pour : "Flask App Service", "Django App Service", "FastAPI App Service", "déployer Python sur App Service". NE PAS UTILISER POUR : Container Apps, Functions, non-Python, Terraform/Bicep/IaC, infrastructure complète — utiliser azure-prepare.

Qu'est-ce que python-appservice-deploy ?

Cette compétence permet de déployer du code Python (Flask, Django, FastAPI ou générique) sur Azure App Service Linux (P0v3, Python 3.14). Elle crée automatiquement le groupe de ressources, le plan App Service et l'application web s'ils n'existent pas. Le déploiement s'effectue via `azd deploy` ou `az webapp deploy --type zip`. Elle détecte le framework (à titre indicatif) et configure la commande de démarrage appropriée. Pour FastAPI, elle définit `python -m uvicorn main:app --host 0.0.0.0` ; pour Flask/Django, Oryx détecte automatiquement le point d'entrée. La compétence impose des règles strictes : aucune vérification post-déploiement (l'application met 2 à 3 minutes à chauffer), utilisation correcte de `--runtime "PYTHON:3.14"` (jamais `|`), et interdiction d'utiliser `az webapp up` (obsolète). Elle délègue à `azure-prepare` tout ce qui concerne VNet, Key Vault, bases de données ou IaC.

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

Installed? Explore more Développement et programmation skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Python sur Azure App Service — Déploiement de code

Déploie du code Python (Flask, Django, FastAPI, générique) sur Azure App Service Linux (P0v3, Python 3.14). Crée le RG + Plan + Web App s'ils sont manquants. Délègue à azure-prepare pour VNet, Key Vault, bases de données ou IaC.

Outils MCP utilisés : mcp_azure_mcp_subscription_list, mcp_azure_mcp_group_list, mcp_azure_mcp_appservice, mcp_azure_mcp_azd (quand azure.yaml est présent).

Workflow

  1. Résolution du contexte — valeurs par défaut intelligentes, invites minimales. Seul le nom de l'application est interactif ; le RG (<app>-rg), le Plan (<app>-plan), la région (valeur az par défaut ou eastus2), l'abonnement sont dérivés. create-app.md §1.
  2. Détection du framework (indicative, ne bloque jamais). detect.md.
  3. Choix du chemin — azure.yaml host : appservice → deploy-azd.md ; sinon deploy-azcli.md.
  4. Assurer l'existence du RG → Plan (P0v3 --is-linux) → Web App (--runtime "PYTHON:3.14") . En cas d'erreur ARM transitoire, suivre transient-retry.md. create-app.md.
  5. Définir le démarrage — Flask/Django : aucun (Oryx détecte automatiquement). FastAPI : toujours python -m uvicorn main:app --host 0.0.0.0. Autres : avertir. startup-commands.md.
  6. Définir SCM_DO_BUILD_DURING_DEPLOYMENT=true .
  7. Déployer — azd deploy ou az webapp deploy --type zip --track-status false.
  8. STOP. Afficher le message post-déploiement (post-deploy-message.md) et terminer le tour.

Règles strictes

  • ⛔ AUCUNE VÉRIFICATION POST-DÉPLOIEMENT — après le retour du déploiement, n'exécutez pas az webapp log tail, curl, Invoke-WebRequest ni aucune sonde de santé. App Service a besoin de 2 à 3 minutes pour chauffer ; un log silencieux ou un 5xx précoce n'est pas un échec.
  • ⛔ SÉCURITÉ DU SHELL — pour --runtime, utilisez toujours "PYTHON:3.14" (deux-points). Jamais "PYTHON|3.14" (le pipe est un opérateur shell).
  • ⛔ NE JAMAIS UTILISER az webapp up — obsolète. Utilisez les commandes de l'étape 7.
  • ✅ FORMAT D'URL — présentez les points de terminaison sous forme d'URL https://....

Gestion des erreurs

Voir errors.md pour la matrice complète symptôme → cause → correctif. Tri rapide : plan/application manquant → réexécuter l'étape 4 ; délai d'attente du conteneur sur le port 8000 → corriger le démarrage (étape 5) ; ModuleNotFoundError après déploiement → vérifier que l'étape 6 a été exécutée, redéployer.

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.

Skills associés