
Pydantic
Type-hint-driven data validation that runs on Pydantic v2's Rust core for FastAPI, Django, and config work.
- skills.sh installs
- 2.2K
- GitHub stars
- 80
- last updated
- May 16, 2026
Own this skill? Claim it
What it does
- Covers BaseModel definitions, field constraints, custom types, field and model validators, and v1-to-v2 migration mapping
- Includes built-in types such as
EmailStr,HttpUrl,SecretStr,FilePath, andJson, plus constrained andLiteraltypes - Provides
model_dump,model_validate, andmodel_validate_jsonin place of the deprecated v1.dict(),.parse_obj(), and.parse_raw() - Designed for API request and response validation, settings management, ORM model checks, and typed CLI parsing
Install
$ npx -y skills add bobmatnyc/claude-mpm-skills --skill pydantic -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Pydantic Validation Skill
Summary
Python data validation using type hints and runtime type checking with Pydantic v2's Rust-powered core for high-performance validation.
When to Use
- API request/response validation (FastAPI, Django)
- Settings and configuration management (env variables, config files)
- ORM model validation (SQLAlchemy integration)
- Data parsing and serialization (JSON, dict, custom formats)
- Type-safe data classes with automatic validation
- CLI argument parsing with type safety
Quick Start
from pydantic import BaseModel, Field, EmailStr
from datetime import datetime
class User(BaseModel):
id: int
name: str = Field(..., min_length=1, max_length=100)
email: EmailStr
created_at: datetime = Field(default_factory=datetime.now)
is_active: bool = True
# Validate data
user = User(id=1, name="Alice", email="alice@example.com")
print(user.model_dump()) # {'id': 1, 'name': 'Alice', ...}
# Automatic type coercion
user2 = User(id="2", name="Bob", email="bob@example.com")
assert user2.id == 2 # String "2" coerced to int
Details
- Repository
- github.com/bobmatnyc/claude-mpm-skills
- Categories
- Python, Backend & APIs
More from bobmatnyc/claude-mpm-skills
All 154- Drizzle Migrations1.3K
- Pytest1.3K
- Tailwind Css1.2K
- Docker1.1K
- Trpc Type Safety1K
- Biome962
- Vitest951
- Daisyui924
- Zod909
- Sqlalchemy Orm873
- Github Actions780
- Nodejs Backend Typescript745
- Cypress672
- Session Compression672
- Opentelemetry658
- Hono Cloudflare650
- Wordpress Security Validation632
- Xlsx607
- Tanstack Query603
- Fastify590
- Api Design Patterns587
- Skill Creator577
- Git Workflow576
- Express Production527
Similar to Pydantic
More Python
mypySkillbobmatnyc/claude-mpm-skills487 installsStatic type checker for Python that adds gradual typing, strict mode, and Protocol support to existing code.
zodSkillbobmatnyc/claude-mpm-skills909 installsTypeScript schema validation library that infers static types from runtime schemas for forms and APIs.
fastapiSkillfastapi/fastapi15.7K installsOfficial FastAPI skill covering API design, Pydantic models, dependencies, streaming, and frontend serving.
python-configurationSkillwshobson/agents12.2K installsTyped Python configuration via environment variables, using pydantic-settings, with fail-fast validation at startup.
fastapi-pythonSkillmindrally/skills14.1K installsExpert FastAPI guidance for async Python APIs with modular structure and explicit error-handling conventions.
data-qualityPlugingreyhaven-ai/claude-code-config31 starsData validation and quality assurance tools using Pydantic v2, schema validation, data contracts, and quality monitoring for PlanetScale PostgreSQL databases