This skill provides a comprehensive framework for implementing Azure Cosmos DB services in Python, focusing on maintainability and security. It guides developers through setting up singleton clients with RBAC authentication via DefaultAzureCredential, implementing a robust five-tier Pydantic model hierarchy for data separation, and creating service layers that support graceful degradation. By emphasizing test-driven development (TDD) with pre-configured mocking patterns and partition key isolation, it ensures that Cosmos DB integrations are both scalable and resilient within modern cloud-native architectures.
主要功能
01Implements RBAC authentication using DefaultAzureCredential for secure Azure environments
02Enforces parameterized queries and partition key validation to prevent injection and data leaks
03Sets up singleton container initialization with dual-auth support for cloud and local emulator
04Includes TDD-ready pytest patterns and fixtures for seamless mocking of Cosmos DB interactions
0537,721 GitHub stars
06Provides a five-tier Pydantic model pattern for clean schema evolution and API separation
使用场景
01Implementing enterprise-grade data access layers with strict security and reliability requirements
02Building scalable NoSQL backend services for FastAPI or Flask applications in Azure
03Migrating local development workflows to production-ready Azure cloud infrastructure