azure-cosmos-py
Skill by sickn33
Guides an AI assistant through the Azure Cosmos DB SDK for Python, covering NoSQL document CRUD, queries, containers and throughput. Intended for developers building Python apps on Azure Cosmos DB.
Install azure-cosmos-py
Built from the published package, never by AI.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agentic-awesome-skills/skills/azure-cosmos-py ~/.claude/skills/azure-cosmos-pyRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/agentic-awesome-skills/skills/azure-cosmos-py ~/.gemini/antigravity-cli/skills/azure-cosmos-pyAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The azure-cosmos-py skill gives an AI assistant guidance for the Azure Cosmos DB SDK for Python, which targets the NoSQL API. It includes code patterns for creating databases and containers, and for creating, reading, replacing, upserting and deleting documents. It also covers queries within a partition or across partitions, partition key definitions, provisioned throughput in RU/s, the async client, and error handling for status codes such as 404 and 429.
The skill sets out several cautions. It says to confirm the account, partition key and budget before provisioning or changing throughput, and notes that create_if_not_exists does not reconcile an existing container. It recommends ETag conditions for read-modify-write operations. It is aimed at developers building Python applications on Azure Cosmos DB. The frontmatter marks its risk as critical, and one helper script is not available in this copy.
Written from the project's SKILL.md and checked against it.
What it can do
- Document CRUDCreate, read, replace, upsert and delete items in a container.
- QueriesRun parameterized queries within one partition or across partitions.
- ContainersCreate or get databases and containers with a partition key.
- ThroughputSet, read and replace provisioned throughput in RU/s.
- Partition keysDefine single partition keys and hierarchical partition keys (preview).
- Async clientUse the async CosmosClient with async iteration over query results.
- Error handlingCatch CosmosHttpResponseError and handle 404 and 429 responses.
What you need
- Python
- pip packages azure-cosmos and azure-identity
- An Azure Cosmos DB NoSQL account endpoint
- Azure credentials that DefaultAzureCredential can use
Try asking
- Create a Cosmos DB container partitioned on /category with 400 RU/s
- Write a Python function that upserts an item into my Cosmos DB container
- Show me a parameterized query for items under a price in Cosmos DB
Good to know
- The frontmatter marks this skill's risk as critical.
- scripts/setup_cosmos_container.py is unavailable in this catalog copy.
- Hierarchical partition keys are labeled as preview.
- Cross-partition queries are described as more expensive and to be used sparingly.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/azure-cosmos-py/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB -
UPSTREAM-LICENSE.txt1 KB -
UPSTREAM-NOTICE.md2 KB -
references/partitioning.md11 KB -
references/query-patterns.md10 KB
Alternatives to azure-cosmos-py
All alternatives →Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.
Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.
Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.
Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.
Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.
Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.
Compare with hugging-face-datasets, db-repair or alloydb-basics
azure-cosmos-py: common questions
Does this skill need an Azure Cosmos DB account?
The examples connect to an Azure Cosmos DB account endpoint using DefaultAzureCredential from azure-identity. The source does not explain how to create the account.
Are cross-partition queries recommended?
The source says they are more expensive and should be used sparingly. It recommends including a partition key for point reads and queries when possible.
Is change feed processing exactly once?
No. The source says the change feed is not a globally ordered, exactly-once ledger and advises checkpointing only after idempotent processing.
How do I install azure-cosmos-py?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is azure-cosmos-py free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is azure-cosmos-py safe to use?
It scores 93 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to azure-cosmos-py?
Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.
