Contribute Media
A thank you to everyone who makes this possible: Read More

Type safe data validation using Pydantic v2

Description

This talk will introduce Pydantic users, old or new, to the new APIs available in Pydantic v2, best practices for using them, and some of the powerful new features we added support for, like PEP 593's Annotated and PEP 695's TypeAliasType.

We'll then dive deeper into how Pydantic v2 interacts with Python's type system, what we've learned from that, and how we can improve runtime <-> static typing interactions even more.

Finally, we'll touch on some of the internals of Pydantic, including our use of Rust and how we've essentially ended up building a DSL that translates type hints and snippets of arbitrary user-defined logic into a DAG of computations in Rust (i.e. how we accidentally built a compiler).

Details

Improve this page