pydantic-v2
Installation
SKILL.md
Pydantic V2 Expert Skill
Expert guidance for data validation and settings management using Pydantic V2 in Python. Pydantic V2 uses a Rust core (pydantic-core) for massive performance improvements and introduces new API methods (e.g., model_dump instead of dict).
1. Installation
pip install "pydantic>=2.0"
2. Basic Models & Field
Use BaseModel to define data schemas and Field to add metadata, default values, or constraints.
from datetime import datetime
from pydantic import BaseModel, Field