From Pydantic V1 to V2
summary
Pydantic v2 splits into a pure-Python layer that emits a nested core schema dict and a Rust-backed pydantic-core (Rust) library that compiles that schema into a schema validator object, giving benchmarks up to 17x performance gains; most validation runs in Rust. Trade-offs: faster and more maintainable but cyclic models can cause stack overflows, Rust APIs feel verbose, and migration is eased by vendoring v1 as pydantic.v1 while you progressively update imports.
AI-written summary · about
chapters (6)
- 0:00Introduction to Pydantic
- 3:12Pydantic V1 vs V2 architecture
- 6:25Pydantic core and Rust integration
- 9:19New features in Pydantic V2
- 13:14Pydantic use cases
- 18:04Q&A session
related talks
46mHow Pydantic V2 leverages Rust's Superpowers
22mPydantic Power-up: Performance Tips for Lightning-Fast Python Applications
22mFrom Pydantic v1 to v2 A Deep Dive Migration for Real Production Systems
21mLet JSON Schema and Pydantic write your data models
26mIntro to Pydantic, run-time type checking for your dataclasses
34mRust for the Python dev
28m"Validating Complex Types Using Pydantic"
44mHow Python Harnesses Rust through PyO3
