What problem does it solve? Python applications often receive untrusted or loosely typed data from APIs, environment variables, and databases, leading to runtime errors and inconsistent state. This Skill provides patterns for enforcing type safety and validation rules at runtime using Pydantic v2. ## Core Features & Use Cases - Model Validation: Define BaseModel classes with field constraints, custom validators, and automatic type coercion for API request/response handling in FastAPI and Django. - Settings Management: Load and validate environment variables and .env files with BaseSettings, including nested configuration and multi-environment support. - ORM and Serialization Integration: Convert SQLAlchemy and Django ORM objects to validated schemas, customize JSON serialization, and generate JSON Schema for OpenAPI documentation. - Use Case: When building a FastAPI endpoint that accepts user registration data, define a UserCreate model with EmailStr and password length constraints so invalid payloads are rejected automatically with detailed error messages. ## Quick Start Ask the AI to create a Pydantic v2 model with field validators for your API request payload.