Azure Cosmos DB Python Implementation

0•

Implements production-grade Azure Cosmos DB NoSQL services using clean code, TDD, and security best practices.

This skill provides a comprehensive framework for building robust Azure Cosmos DB services within Python applications, specifically optimized for FastAPI and modern cloud environments. It guides Claude to implement a structured architecture including a singleton client module with dual-authentication support, a five-tier Pydantic model hierarchy for data separation, and a dedicated service layer for business logic. By enforcing security standards like RBAC via Managed Identities and promoting Test-Driven Development (TDD) through specialized pytest patterns, it ensures that developers can build scalable, maintainable, and secure database interactions while handling common concerns like graceful degradation and async execution.

주요 기능

01Five-tier Pydantic model hierarchy for clean schema evolution
02Automated TDD patterns for mocking Cosmos DB in unit tests
03Async wrapper implementation to prevent event loop blocking
04Singleton client module with RBAC and local emulator support
050 GitHub stars
06Secure-by-default parameterized queries and partition key validation

사용 사례

01Refactoring existing database logic to follow clean code and TDD principles
02Architecting a new FastAPI backend with scalable NoSQL storage
03Implementing secure Azure authentication (RBAC) to eliminate hardcoded secrets