Pydantic v2 runs validation in Rust (pydantic-core). Use model_validate() to parse dicts/JSON, model_dump() to serialize with include/exclude/by_alias, field_validator for single-field normalization, and model_validator(mode='after') for cross-field invariants (like start_date < end_date). BaseSettings loads and validates env vars at startup.
Follow-up Interview Question · Why should response_model in FastAPI be distinct from your SQLAlchemy or internal DB model?