advanced-alchemy-getting-started
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.
Example Pattern
from advanced_alchemy.config import AsyncSessionConfig, SQLAlchemyAsyncConfig
alchemy_config = SQLAlchemyAsyncConfig(
connection_string="sqlite+aiosqlite:///app.db",
session_config=AsyncSessionConfig(expire_on_commit=False),
create_all=True,
)
Validation Checklist
- Confirm the selected config class matches the driver and execution style.
- Confirm metadata creation or migrations can see the same models as runtime code.
- Confirm a repository or service can open a session and perform one basic read or write.
- Confirm framework integration is deferred until the underlying SQLAlchemy setup works.
Cross-Skill Handoffs
- Use
advanced-alchemy-modelingfor base classes, mixins, and relationships. - Use
advanced-alchemy-repositoriesandadvanced-alchemy-servicesonce CRUD is working. - Use
advanced-alchemy-litestar,advanced-alchemy-fastapi, oradvanced-alchemy-flaskfor framework wiring. - Use
advanced-alchemy-cliandadvanced-alchemy-database-seedingafter the base setup is stable.
Advanced Alchemy References
Weekly Installs
5
Repository
alti3/litestar-skillsGitHub Stars
5
First Seen
5 days ago
Security Audits
Installed on
cline5
gemini-cli5
github-copilot5
codex5
kimi-cli5
cursor5