~/talk

Intro to Pydantic, run-time type checking for your dataclasses

Talkat PyCon US 2021 · 2021-05-14..05-15· [python, typescript]
slides:none on file

Pydantic enforces runtime type checking for dataclasses and BaseModel classes so invalid inputs are rejected immediately and errors name the field and index that failed (example: ham rejected from a toppings tuple). It parses JSON back and forth and emits JSON Schema (Draft 7) for OpenAPI, supports custom root validators to encode business rules and a validate_arguments decorator for functions, plugs into FastAPI for automatic docs, and pairs with Hypothesis to generate tests.

AI-written summary · about

  1. 0:00Intro
  2. 7:26runtime type checking
  3. 13:25JSON Schema
  4. 17:45validate arguments decorator
  5. 19:18pydantic frameworks
  6. 20:40automatic testing
  7. 21:44fast API
  8. 23:41conclusion
  9. 24:18outro
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.