pydantic-models-py
Installation
SKILL.md
Pydantic Models
Create Pydantic models following the multi-model pattern for clean API contracts.
Quick Start
Use the inline model patterns below and adapt class names and fields to the actual API contract. Inspect the installed Pydantic version before selecting configuration syntax; these fragments require the imports and application types shown by your project. Do not assume a standalone template file is bundled.
Multi-Model Pattern
| Model | Purpose |
|---|---|
Base |
Common fields shared across models |
Create |
Request body for creation (required fields) |
Update |
Request body for updates (all optional) |
Response |
API response with all fields |
InDB |
Database document with doc_type |