advanced-alchemy-flask

Installation
SKILL.md

Flask

Execution Workflow

  1. Choose SQLAlchemySyncConfig by default, or SQLAlchemyAsyncConfig only when Flask async routes are intentional and supported.
  2. Initialize AdvancedAlchemy with the app and use its session helpers rather than global engine state.
  3. Use bind_key only when the application truly needs multiple databases.
  4. Wrap CRUD-heavy services with FlaskServiceMixin when its jsonify() helper meaningfully simplifies responses.
  5. Use flask database commands once migrations are wired through the extension.

Implementation Rules

  • Keep commit_mode explicit: manual, autocommit, or autocommit_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.

Example Pattern

Related skills

More from alti3/litestar-skills

Installs
4
GitHub Stars
5
First Seen
Mar 9, 2026