Pydantic
Composite Recipes
Recipes that include further recipes, often including the individual recipes below.
Recipes
- Find
@model_validator(mode='after')on a classmethod - Find deprecated
json_encodersconfig option - Find deprecated
schema_generatorconfig option - Find
eval_type_backportusage removed in Pydantic 2.14 - Find
serialize_as_anyusage affected by the Pydantic 2.12 unification - Remove
...(Ellipsis) fromField() - Replace
Finalmodel fields with a default withClassVar - Replace instance access of
model_fields/model_computed_fields - Replace
populate_by_namewithvalidate_by_name - Upgrade to Pydantic 2.13