skillfed

azure-mgmt-commerce

Microsoft Azure Commerce Management Client Library for Python

azure-mgmt-commerce v6.0.1 1.7M downloads/30d#3,673 on PyPI5,588
License unclear Active released

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-commerce

uv

uv add azure-mgmt-commerce

poetry

poetry add azure-mgmt-commerce

Installing 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

Development Status :: 5 - Production/StableProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

azure commerce management clientazure usage aggregation apiazure billing data pythonazure mgmt sdk pythonazure subscription usage tracking
azure-sdkcloud-management

More Internet packages

botocore

Botocore provides low-level, data-driven access…

permissive · top 100 on PyPI

aiobotocore

Provides an async client for AWS services using…

permissive · top 100 on PyPI

pydantic

Pydantic validates Python data structures…

permissive · top 100 on PyPI

filelock

Provides a platform-independent file locking…

permissive · top 100 on PyPI

fastapi

FastAPI is a Python web framework for building…

permissive · top 100 on PyPI

googleapis-common-protos

Provides common Protocol Buffer message…

permissive · top 100 on PyPI

azure-mgmt-managementpartner

Provides a Python client library for managing…

unclear · top 5,000 on PyPI

azure-mgmt-monitor

Provides programmatic access to Azure Monitor…

permissive · top 5,000 on PyPI

azure-mgmt-subscription

Provides Python client library for managing…

permissive · top 5,000 on PyPI

azure-mgmt-streamanalytics

Provides Python client library for managing…

permissive · top 15,000 on PyPI

azure-mgmt-marketplaceordering

Manages Azure Marketplace ordering agreements…

unclear · top 5,000 on PyPI

azure-mgmt-managedservices

Provides Python client library for managing…

unclear · top 15,000 on PyPI

azure-mgmt-resourcegraph

Provides a Python client library to query and…

unclear · top 5,000 on PyPI

azure-mgmt-msi

Manages Azure Managed Service Identities…

permissive · top 5,000 on PyPI

azure-mgmt-resource-subscriptions

Manages Azure subscriptions and related…

permissive · top 15,000 on PyPI

azure-mgmt-trafficmanager

Provides a Python client library to manage…

permissive · top 5,000 on PyPI