azure-mgmt-commerce
Microsoft Azure Commerce Management Client Library for Python
What it is and what it does
azure-mgmt-commerce is the official Python client library for interacting with Azure's Commerce Management API. It allows developers to query and retrieve Azure usage aggregation data, billing information, and related metrics programmatically. The library is part of the broader Azure SDK for Python and follows modern Azure SDK patterns, including unified credential handling and type annotations.
The package is built on top of azure-mgmt-core and integrates with the Azure authentication system. It requires Python 3.9 or later and is tested against Python 3.10+. The library exposes a UsageManagementClient that can be instantiated with credentials and a subscription ID, providing access to usage data and billing operations. No known security vulnerabilities are recorded.
Use it for:
- Query Azure usage aggregation data for a subscription to track resource consumption over time.
- Retrieve billing and cost information programmatically for cost analysis and reporting.
- Integrate Azure usage metrics into internal dashboards or monitoring systems.
- Automate billing data collection for multi-subscription Azure environments.
- Build custom cost allocation or chargeback tools on top of Azure usage data.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Python client library for managing Azure Commerce resources, enabling programmatic access to Azure usage and billing data through the Azure management API.
Yes, if you need programmatic access to Azure usage and billing data. The package is actively maintained, has low install friction, and is the official Microsoft library for this purpose. However, verify the license terms before use in proprietary contexts, as the license treatment is currently unclear in the metadata.
Install
azure-mgmt-commerce on PyPI
pip
pip install azure-mgmt-commerceuv
uv add azure-mgmt-commercepoetry
poetry add azure-mgmt-commerceInstalling azure-mgmt-commerce
Before you install
Low install friction with a pure-wheel distribution. Actively maintained as of 2026-05-15 with recent commits; requires Python 3.9+ and three lightweight runtime dependencies (isodate, azure-mgmt-core, typing-extensions).
License in practice
License treatment is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the GitHub repository before use in proprietary or restricted contexts.
Quickstart
pip install azure-mgmt-commerce
from azure.mgmt.commerce import UsageManagementClient
from azure.identity import DefaultAzureCredential
import os
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = UsageManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
Requires Python 3.9+. Azure authentication credentials must be configured via environment variables (AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID).
Verify before relying
- Specific operations and models available in version 6.0.1 versus beta features in later releases.
- Whether additional packages beyond the three runtime dependencies are needed for typical usage patterns.
- Actual license terms and compatibility restrictions for commercial use.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — isodate, azure-mgmt-core, typing-extensions |
| Maintenance | actively maintained — 91 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,662,217/month — #3,673 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: azure_mgmt_commerce-6.0.1-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-managementpartnerProvides a Python client library for managing…
unclear · top 5,000 on PyPI
azure-mgmt-monitorProvides programmatic access to Azure Monitor…
permissive · top 5,000 on PyPI
azure-mgmt-subscriptionProvides Python client library for managing…
permissive · top 5,000 on PyPI
azure-mgmt-streamanalyticsProvides Python client library for managing…
permissive · top 15,000 on PyPI
azure-mgmt-marketplaceorderingManages Azure Marketplace ordering agreements…
unclear · top 5,000 on PyPI
azure-mgmt-managedservicesProvides Python client library for managing…
unclear · top 15,000 on PyPI
azure-mgmt-resourcegraphProvides a Python client library to query and…
unclear · top 5,000 on PyPI
azure-mgmt-msiManages Azure Managed Service Identities…
permissive · top 5,000 on PyPI
azure-mgmt-resource-subscriptionsManages Azure subscriptions and related…
permissive · top 15,000 on PyPI
azure-mgmt-trafficmanagerProvides a Python client library to manage…
permissive · top 5,000 on PyPI