azure-mgmt-cosmosdb
Microsoft Azure Cosmosdb Management Client Library for Python
What it is and what it does
This is the official Azure SDK management client for Cosmos DB. It lets you create, update, delete, and query Cosmos DB accounts, databases, containers, and clusters programmatically from Python code. You authenticate via Microsoft Entra using environment variables or credential objects, then instantiate a CosmosDBManagementClient and call methods on operation groups to manage your infrastructure.
The package requires Python 3.10 or later and depends on azure-mgmt-core (the base Azure management SDK), isodate (for date parsing), and typing-extensions (for type hints). It is designed for infrastructure automation, deployment pipelines, and administrative tooling rather than for querying data within Cosmos DB itself.
Use it for:
- Automate provisioning of Cosmos DB accounts and databases in CI/CD pipelines
- Build infrastructure-as-code scripts to manage Cosmos DB resources across environments
- Create administrative dashboards or tools that list and configure Cosmos DB clusters
- Programmatically scale throughput or adjust backup schedules on existing databases
- Migrate or replicate Cosmos DB configurations across Azure subscriptions or regions
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides programmatic management of Azure Cosmos DB resources—databases, containers, clusters, and accounts—via the Azure control plane.
Yes—if you need to manage Azure Cosmos DB resources from Python code. The package is actively maintained, has no known vulnerabilities, low install friction, and is the official Microsoft SDK for this purpose. Requires Python 3.10+, Azure subscription, and proper Entra authentication setup.
Install
azure-mgmt-cosmosdb on PyPI
pip
pip install azure-mgmt-cosmosdbuv
uv add azure-mgmt-cosmosdbpoetry
poetry add azure-mgmt-cosmosdbInstalling azure-mgmt-cosmosdb
Before you install
Low install friction; pure Python wheel with three lightweight runtime dependencies. Actively maintained with recent release (42 days old); repository is not archived and has 5588 stars.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install azure-mgmt-cosmosdb
from azure.mgmt.cosmosdb import CosmosDBManagementClient
import os
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = CosmosDBManagementClient(
credential=credential,
subscription_id=sub_id
)
Requires Python 3.10+; Azure subscription and Entra credentials (AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID environment variables) must be configured.
Verify before relying
- Whether the package includes async/await support for management operations
- Specific Azure Cosmos DB API types supported (SQL, MongoDB, Cassandra, Gremlin, Table)
- Rate limits or throttling behavior for management plane calls
- Whether azure-identity is required or optional for authentication
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 — 42 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 14,239,128/month — #1,241 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: azure_mgmt_cosmosdb-10.0.0-py3-none-any.whl
Keywords: azure, azure sdk
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
azure-mgmt-sqlProvides programmatic management of Azure SQL…
permissive · top 5,000 on PyPI
azure-cosmosdb-tableClient library for reading, writing, and…
permissive · top 5,000 on PyPI
pydocumentdbPython client library for interacting with…
permissive · top 15,000 on PyPI
agent-framework-azure-cosmosProvides Azure Cosmos DB integration for the…
permissive · top 15,000 on PyPI
azure-cosmosPython client library for Azure Cosmos DB SQL…
permissive · top 1,000 on PyPI
azure-data-tablesProvides a Python client for reading, writing,…
permissive · top 5,000 on PyPI
azure-mgmt-resource-deploymentsManages Azure resource deployments…
permissive · top 5,000 on PyPI
azure-mgmt-resourceProvides Python bindings to manage Azure…
permissive · top 1,000 on PyPI
azure-mgmt-webProvides programmatic management of Azure Web…
permissive · top 5,000 on PyPI
azure-mgmt-storageManages Azure Storage accounts, containers,…
permissive · top 5,000 on PyPI