This skill provides a comprehensive framework for implementing Azure Cosmos DB within Python applications, specifically optimized for high-performance environments like FastAPI. It guides developers through setting up a robust architecture including singleton client connections with dual authentication—supporting both Azure RBAC for production and local keys for development. It enforces clean code standards through a five-tier Pydantic model hierarchy, ensures security with parameterized queries, and facilitates high testability with built-in mocking patterns for Pytest. Ideal for developers needing to implement scalable, secure, and maintainable NoSQL service layers.
主要功能
01Pre-configured Pytest fixtures and mocking patterns for TDD
0237,721 GitHub stars
03Async-wrapped singleton client management for performance
04Dual Authentication support for DefaultAzureCredential and Local Emulator
05Five-tier Pydantic model hierarchy for clean schema evolution
06Service layer patterns with graceful degradation logic
使用场景
01Implementing a local development workflow using the Cosmos DB Emulator
02Migrating from connection string authentication to secure Azure RBAC
03Architecting a scalable FastAPI backend with Cosmos DB storage