LaunchKit · 2026

Setup & Installation

npx skills add https://github.com/microsoft/skills --skill azure-cosmos-py
or paste the link and ask your coding assistant to install it
https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-python/skills/azure-cosmos-py
View on GitHub

What This Skill Does

Python client library for Azure Cosmos DB's NoSQL API. Handles document CRUD, SQL-like queries, container management, and throughput configuration against a globally distributed database. Supports both sync and async operations.

The SDK handles authentication via DefaultAzureCredential, enforces partition key usage at the API level, and provides typed error codes for rate limiting and 404s, which removes a lot of boilerplate compared to raw HTTP calls to the Cosmos REST API.

When to use it

  • Reading and writing JSON documents by partition key in a Cosmos DB container
  • Running parameterized SQL queries against a specific partition to filter product catalog data
  • Upserting user session records so writes are idempotent across retries
  • Adjusting provisioned throughput (RU/s) on a container based on traffic patterns
  • Querying across partitions to aggregate records when partition key is unknown at query time