~/talk

Type safe data validation using Pydantic v2

Talkat PyBay 2023 · on Sunday, 2023-10-08· [python, compilers-and-language-design]
links:none on file
slides:none on file

Pydantic v2 replaces V1’s root-model hacks with TypeAdapter to build parsers/serializers for arbitrary Python types, adds support for Annotated (PEP 593) and TypeAliasType so type checkers and validators share metadata, and exposes validators that can conditionally call expensive functions. Internals compile an IR into Rust (a compiler-like Rust DAG), yielding much faster runtime validation but slower import/schema build times; JSON parsing can map floats to Decimal and recursive JSON schemas now work correctly.

AI-written summary · about

  1. 0:00Introduction to Pydantic v2
  2. 1:07What changed in Pydantic v2
  3. 3:14Runtime validators in Pydantic v2
  4. 4:18Pydantic v2 and type system interaction
  5. 7:07Type aliases and recursive types
  6. 8:53Type checkers and annotated types
  7. 9:56Remaining pain points in Pydantic v2
  8. 12:26Pydantic v2 internals and Rust
  9. 18:05Recommendations for Rust extensions
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.