{"id":27604,"library":"azure-cli-appservice","title":"Azure CLI AppService Command Module","description":"Microsoft Azure CLI extension for managing App Service resources like web apps, functions, and slots. Version 0.2.21 works with Azure CLI core. Releases follow Azure CLI releases (approx. monthly).","status":"active","version":"0.2.21","language":"python","source_language":"en","source_url":"https://github.com/Azure/azure-cli","tags":["azure","appservice","cli","extension"],"install":[{"cmd":"pip install azure-cli-appservice","lang":"bash","label":"Install from PyPI"},{"cmd":"az extension add --name appservice","lang":"bash","label":"Install via Azure CLI (if available)"}],"dependencies":[{"reason":"Required for all Azure CLI extensions","package":"azure-cli-core","optional":false}],"imports":[{"note":"This is the typical import for command module loaders.","wrong":"","symbol":"AppServiceCommandsLoader","correct":"from azure.cli.command_modules.appservice import AppServiceCommandsLoader"},{"note":"WebApp is not a top-level class in the command module; use the management client instead.","wrong":"from azure.cli.command_modules.appservice import WebApp","symbol":"WebApp","correct":"from azure.mgmt.web import WebSiteManagementClient"}],"quickstart":{"code":"from azure.cli.command_modules.appservice import AppServiceCommandsLoader\nauth = os.environ.get('AZURE_AUTH_LOCATION', '')\nprint(f'AppServiceCommandsLoader imported (auth: {auth})')","lang":"python","description":"Verifies import of the command module loader. To use CLI commands, invoke via Azure CLI, not directly in Python."},"warnings":[{"fix":"Install azure-cli-core alongside this package.","message":"This package is a command module for Azure CLI. It should not be used standalone; always install azure-cli or azure-cli-core first.","severity":"gotcha","affected_versions":"all"},{"fix":"Use Azure CLI commands (e.g., `az webapp`) instead of direct imports.","message":"Importing symbols directly from azure.cli.command_modules.appservice is not supported for public use. The module is designed to be loaded by Azure CLI's command loader.","severity":"gotcha","affected_versions":"all"},{"fix":"Run `az find \"webapp\"` or check Azure CLI release notes.","message":"Some commands may be deprecated in future releases. Check release notes for appservice-specific deprecations.","severity":"deprecated","affected_versions":">=0.2.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use `from azure.mgmt.web import WebSiteManagementClient` and access WebApp through the client.","cause":"Attempting to import a model class that belongs to the management SDK, not the command module.","error":"ImportError: cannot import name 'WebApp' from 'azure.cli.command_modules.appservice'"},{"fix":"Install azure-cli-core: pip install azure-cli-core","cause":"Command module loaded directly without Azure CLI core installed.","error":"ModuleNotFoundError: No module named 'azure.cli.core'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}