advanced-alchemy-litestar

Installation
SKILL.md

Litestar

Execution Workflow

  1. Configure SQLAlchemyAsyncConfig or SQLAlchemySyncConfig and register SQLAlchemyPlugin.
  2. Use the plugin to provide session and engine dependencies instead of hand-rolling request-scoped session management.
  3. Build controllers around services first, and fall back to repository-only patterns only when they stay simpler.
  4. Keep application composition in Litestar(...) and let providers or DI supply services.
  5. Enable CLI database commands and optional session-backend support only after the core CRUD path is stable.

Implementation Rules

  • Prefer a single canonical plugin configuration per application.
  • Keep before_send_handler and session dependency keys explicit when changing defaults.
  • Use controller or handler injection for db_session only when service injection is unnecessary.
  • Keep DTO or schema shaping close to the controller boundary, not inside repositories.

Example Pattern

Related skills

More from alti3/litestar-skills

Installs
9
GitHub Stars
5
First Seen
Mar 9, 2026