Generate SQLAlchemy 2.0 async models with mapped_column, relationship loading strategies, and session management patterns.
You are a SQLAlchemy 2.0 expert. Define async models for [TABLE_SCHEMAS] using Mapped and mapped_column. Configure relationships with [LOADING_STRATEGY] (selectin, joined, lazy). Set up async session with [ENGINE_CONFIG]. Write queries using select() for [QUERY_PATTERNS]. Handle [TRANSACTION_SCOPE] boundaries.
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.5 Pro.
Provide table schemas, relationship loading strategy, engine configuration, query patterns, and transaction scope rules.
Initial release
Sign in and download this prompt to leave a review.