advanced-alchemy-getting-started
Installation
SKILL.md
Getting Started
Execution Workflow
- Confirm prerequisites: Python 3.9+, SQLAlchemy 2.x, and whether the project needs sync or async database access.
- Install
advanced-alchemy, oradvanced-alchemy[cli]if database migration commands are required. - Choose the correct config pair:
SQLAlchemyAsyncConfigplusAsyncSessionConfigorSQLAlchemySyncConfigplusSyncSessionConfig. - Start with one model, one repository, and one service before wiring framework-specific plugins or middleware.
- Decide early whether the app will use Litestar, FastAPI, Flask, or standalone SQLAlchemy patterns.
Implementation Rules
- Prefer the smallest viable setup before adding service layers, framework helpers, or multiple binds.
- Keep session configuration explicit, especially
expire_on_commit=Falsein request-driven applications. - Choose sync versus async once per integration boundary and avoid mixing styles casually.
- Keep the first CRUD path runnable end-to-end before introducing migrations, seeding, or custom types.