litestar-dataclasses

Installation
SKILL.md

Dataclasses

Execution Workflow

  1. Define dataclasses for transport boundaries with explicit field types.
  2. Use defaults and optionality intentionally to avoid ambiguous schemas.
  3. Combine with DTO configuration when write/read shapes diverge.
  4. Keep domain entities and transport dataclasses separate when needed.

Implementation Rules

  • Favor immutable or clearly controlled mutation patterns.
  • Avoid embedding persistence/session behavior in dataclasses.
  • Keep field names/schema stable for clients.
  • Validate nested dataclass behavior in serialization paths.

Example Pattern

Related skills

More from alti3/litestar-skills

Installs
15
GitHub Stars
5
First Seen
Mar 2, 2026