azure-mgmt-consumption
Microsoft Azure Consumption Management Client Library for Python
What it is and what it does
This is the official Microsoft Azure Consumption Management Client Library, part of the broader Azure SDK for Python. It wraps the Azure Consumption Management REST APIs, allowing developers to programmatically access billing data, usage details, reservations, budgets, and cost summaries for Azure subscriptions. The package depends on isodate for date handling, azure-mgmt-core for common SDK infrastructure, and typing-extensions for type hints.
The library is designed for scenarios where you need to integrate Azure cost and consumption data into Python applications—pulling billing history, analyzing usage patterns, managing budgets, or building cost optimization tools. It requires Python 3.10+ and authentication via Microsoft Entra using environment variables. The most recent release (11.0.0, 2026-07-20) added hybrid model support, new properties across many data models, and expanded operation parameters.
Use it for:
- Retrieve detailed usage and billing records for cost analysis and chargeback in multi-tenant or departmental Azure environments
- Build automated budget monitoring and alerting by querying current spend against defined budget thresholds
- Analyze reservation utilization and recommendations to optimize Azure commitment purchases
- Export consumption data to data warehouses or BI tools for cost trending and forecasting
- Integrate Azure billing into internal finance or FinOps platforms for real-time cost visibility
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides programmatic access to Azure Consumption Management APIs for querying billing, usage, reservations, budgets, and cost data within Azure subscriptions.
Yes. This is the official, actively maintained Azure SDK for consumption management with no known vulnerabilities, permissive licensing, and low install friction. Install it if you need programmatic access to Azure billing, usage, or cost data from Python. Requires Python 3.10+ and Azure subscription credentials.
Install
azure-mgmt-consumption on PyPI
pip
pip install azure-mgmt-consumptionuv
uv add azure-mgmt-consumptionpoetry
poetry add azure-mgmt-consumptionInstalling azure-mgmt-consumption
Before you install
Low install friction with three lightweight runtime dependencies. The package is actively maintained—released 25 days ago with recent commits—and supports current Python versions (3.10+). Part of the official Azure SDK ecosystem.
License in practice
Licensed under MIT, a permissive license allowing commercial and private use with minimal restrictions.
Quickstart
pip install azure-mgmt-consumption
from azure.mgmt.consumption import ConsumptionManagementClient
import os
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = ConsumptionManagementClient(
credential=credential,
subscription_id=sub_id
)
Requires Python 3.10+, Azure subscription, and environment variables AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, and AZURE_SUBSCRIPTION_ID configured for authentication.
Verify before relying
- Whether authentication setup requires additional packages beyond the three listed runtime dependencies
- Performance characteristics when querying large billing datasets or high-volume usage details
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — isodate, azure-mgmt-core, typing-extensions |
| Maintenance | actively maintained — 25 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,885,756/month — #3,464 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: azure_mgmt_consumption-11.0.0-py3-none-any.whl
Keywords: azure, azure sdk
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
azure-mgmt-costmanagementProvides Python bindings to the Azure Cost…
permissive · top 5,000 on PyPI
azure-mgmt-billingProvides programmatic access to Azure billing…
permissive · top 5,000 on PyPI
azure-mgmt-managementgroupsProvides a Python client library to manage…
permissive · top 5,000 on PyPI
azure-mgmt-storageManages Azure Storage accounts, containers,…
permissive · top 5,000 on PyPI
azure-mgmt-batchProvides a Python client library for managing…
unclear · top 5,000 on PyPI
azure-mgmt-resourceProvides Python bindings to manage Azure…
permissive · top 1,000 on PyPI
azure-mgmt-resource-subscriptionsManages Azure subscriptions and related…
permissive · top 15,000 on PyPI
azure-coreProvides shared exceptions, HTTP utilities, and…
unclear · top 1,000 on PyPI
dominodatalabProvides Python bindings to interact with the…
permissive · top 15,000 on PyPI
excelThis package is a name reservation by Microsoft…
unclear · top 15,000 on PyPI