~/talk

Please Don't Put That in a Dict: Better Data Models in Python

Talkat PyCon AU 2026 · 2026-08-26..08-30· [developer-experience, python]
links:none on file
slides:none on file

A hiking-recommendation app built from dictionaries silently suggests closed trails when a field rename turns "status" into None, proving that shape notes fail in prod. The concrete path is: use TypedDict to document shapes for early checks, prefer data class post_init for construction-time checks when appropriate, and use Pydantic at the door to parse don't validate so incoming JSON and LLM outputs are rejected or coerced before anything trusts them.

AI-written summary · about

  1. 0:00Introduction
  2. 1:30Hobby app to dict disaster
  3. 5:46What went wrong
  4. 7:10Python data model options
  5. 9:39When to use dataclass
  6. 13:58Type hints aren't enough
  7. 16:29Parse at the door with Pydantic
  8. 19:38Merging feeds with validation
  9. 21:03Fixing trip report schema
  10. 24:15Dict needs a model
  11. 25:45Closing remarks
~/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.