Concept Flow - Pydantic model definition
Define class inheriting BaseModel
Add fields with types
Create instance with data
Pydantic validates data
Valid data
Instance created
You define a class with fields and types, then create an instance. Pydantic checks the data and either creates the object or raises an error.