Implements modern SQLAlchemy 2.0+ ORM patterns for efficient Python database management and querying.
This skill provides specialized knowledge of modern SQLAlchemy 2.0+ patterns, enabling Claude to generate type-safe and efficient database interaction code. It covers the complete database lifecycle, from defining models using the latest Mapped and mapped_column syntax to handling complex session management, relationships, and PostgreSQL-specific features like upserts and JSON column manipulation. By utilizing these standardized patterns, developers can ensure their Python applications maintain high-performance, maintainable, and secure database layers.
主要功能
01Advanced query patterns including scalars and relationship mapping
02PostgreSQL-specific upsert (ON CONFLICT) logic
03Type-safe session management and dependency injection patterns