pydantic-models-py
Create Pydantic models following the multi-model pattern for clean API contracts.
npx skills add sickn33/agentic-awesome-skills --skill pydantic-models-py --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Pydantic Models Create Pydantic models following the multi-model pattern for clean API contracts. ## Quick Start Copy the template from assets/template.py and replace placeholders: - `{{ResourceName}}` → PascalCase name (e.g., `Project`) - `{{resource_name}}` → snake_case name (e.g., `project`) ## 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` | ## camelCase Aliases ```python class MyModel(BaseModel): workspace_id: str = Field(..., alias="workspaceId") created_at: datetime = Field(..., alias="createdAt") class Config: populate_by_name = True # Accept both snake_case and camelCase ``` ## Optional Update Fields ```python class MyUpdate(BaseModel): """All fields optional for PATCH requests.""" name: Optional[str] = Field(None, min_length=1) description: Optional[str] = None ``` ## Database Document ```python class MyInDB(MyResponse): """Adds doc_type for Cosmos DB queries.""" doc_type: str = "my_resource" ``` ## Integrati
- Quick Start
- Multi-Model Pattern
- camelCase Aliases
- Optional Update Fields
- Database Document
- Integration Steps
- When to Use
- Limitations
What does the pydantic-models-py skill do?
Create Pydantic models following the multi-model pattern for clean API contracts.
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill pydantic-models-py --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.