CHAPTER 01 / 05
Models, fields, and types
Define models, fields, defaults, nested data, aliases, unions, and partial updates.
12 topics
- Start here: Pydantic and its core
- Your first model
- Fields, constraints, and Annotated
- Required fields, defaults, and null
- Strict validation: Python versus JSON
- Model configuration
- Nested models and collections
- Dates, money, enums, URLs, and other useful types
- Input methods and output methods
- Partial updates: missing versus null
- Aliases and external field names
- Unions, Literal, and discriminators