advanced-alchemy-flask
Installation
SKILL.md
Flask
Execution Workflow
- Choose
SQLAlchemySyncConfigby default, orSQLAlchemyAsyncConfigonly when Flask async routes are intentional and supported. - Initialize
AdvancedAlchemywith the app and use its session helpers rather than global engine state. - Use
bind_keyonly when the application truly needs multiple databases. - Wrap CRUD-heavy services with
FlaskServiceMixinwhen itsjsonify()helper meaningfully simplifies responses. - Use
flask databasecommands once migrations are wired through the extension.
Implementation Rules
- Keep
commit_modeexplicit:manual,autocommit, orautocommit_include_redirect. - Prefer request or app-context-managed sessions over module-level state.
- Translate Flask query params into Advanced Alchemy filters near the route boundary.
- Use async sessions in sync routes only with care; that path is documented as experimental.