litestar-custom-types

Community

Enforce domain-specific Litestar types with ease.

Authoralti3
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Litestar applications often require handling domain-specific values that default serializers can't interpret. This skill provides a reliable pattern for decoding and encoding such custom types, ensuring inputs/outputs remain strongly typed and API schemas stay accurate.

Core Features & Use Cases

  • Register type decoders and encoders at the appropriate layer to enable seamless round-trips for custom domain values.
  • Preserve OpenAPI schema generation while supporting nonstandard representations, improving client compatibility and validation.
  • Use cases include handling domain values like ids, codes, or enums that don't map to built-in scalars, with end-to-end validation and test coverage.

Quick Start

Define the domain type, register decoders/encoders, and wire it into Litestar route handlers.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: litestar-custom-types
Download link: https://github.com/alti3/litestar-skills/archive/main.zip#litestar-custom-types

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.