advanced-alchemy-services

Installation
SKILL.md

Services

Execution Workflow

  1. Start from the repository and wrap it with SQLAlchemyAsyncRepositoryService or SQLAlchemySyncRepositoryService.
  2. Define schema types for create, update, and read flows only where service boundaries need validation or conversion.
  3. Set repository_type, loader options, and match_fields explicitly.
  4. Override create(), update(), or to_model() only for real domain rules such as slug generation or multi-model coordination.
  5. Convert outbound models with to_schema() instead of leaking ORM instances to transport layers.

Implementation Rules

  • Keep services responsible for business rules, not controller or router concerns.
  • Accept dictionaries or schema objects, but normalize them consistently through the service.
  • Use schema conversion intentionally: Pydantic, Msgspec, and attrs are all supported.
  • Keep multi-repository workflows atomic and explicit about commit behavior.

Example Pattern

Related skills

More from alti3/litestar-skills

Installs
9
GitHub Stars
5
First Seen
Mar 9, 2026