--- id: az-cli version: "0.5" license: unclear license_treatment: permissive maintenance: abandoned --- # az.cli — An interface to execute Azure CLI commands using Python License: permissive · Maintenance: abandoned · Downloads: 585.0K/mo ## What it is and what it does Az.cli is a thin Python wrapper around the Azure CLI that lets you call `az` commands from within Python scripts and get back structured results. Instead of shelling out and parsing text, you import the `az` function, call it with a command string (e.g., `az("group list")`), and receive a named tuple with an exit code, a parsed dictionary of the result, and any error logs. It relies on azure-cli being installed and configured on your system, using the same authentication and config stored in ~/.azure that the CLI itself uses. The package is straightforward: it wraps the azure.cli.core interface and handles the plumbing of invoking commands and unpacking their output. It's useful for automation scripts, infrastructure-as-code tools, or applications that need to orchestrate Azure resources programmatically without building against the full Azure SDK. Use it for: - Automate Azure resource provisioning and management from Python scripts without calling subprocess directly. - Build infrastructure-as-code tools that need to query or modify Azure resources and parse the results as dictionaries. - Integrate Azure CLI commands into larger Python applications where you want structured output rather than text parsing. - Write test or validation scripts that verify Azure resource state by running CLI commands and checking the returned data. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Executes Azure CLI commands from Python and returns structured results as a named tuple containing exit code, parsed output dictionary, and error logs. No. While the package works and has low install friction, it is abandoned (last release 2021-03-14, last commit 2022-02-25). It will not receive updates for new Azure CLI versions, Python releases, or security issues. For new projects, use the official Azure SDK for Python instead; for existing code, consider migrating away. ## Install pip install az-cli uv add az-cli poetry add az-cli ## Installing az.cli Before you install: Low install friction with a single runtime dependency (azure-cli). However, the package is abandoned—last release was 2021-03-14 and last commit 2022-02-25—so it will not receive updates or security fixes for new Azure CLI versions or Python releases. License in practice: Licensed under MIT (permissive), so you can use, modify, and distribute it freely with minimal restrictions. Quickstart: pip install az.cli from az.cli import az exit_code, result_dict, logs = az("group show -n test") if exit_code == 0: print(result_dict) else: print(logs) Requires azure-cli to be installed and az login or service principal authentication to be configured in ~/.azure before use. Verify before relying: - Whether the package works with Azure CLI versions released after 2022-02-25 or Python versions beyond 3.8. - Current compatibility with modern azure-cli API changes or breaking changes in the underlying azure.cli.core module. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 585.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags azure cli python wrapper, run az commands from python, azure cli programmatic interface, python azure management automation, execute azure cli in scripts, azure-integration, cli-wrapper [View on SkillFed](https://skillfed.io/packages/az-cli) · [View on PyPI](https://pypi.org/project/az-cli/)