1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
Pydantic models are simply classes which inherit from `BaseModel` and define fields as annotated attributes.
::: pydantic.BaseModel
options:
show_root_heading: true
merge_init_into_class: false
group_by_category: false
# explicit members list so we can set order and include `__init__` easily
members:
- __init__
- model_config
- model_fields
- model_computed_fields
- __pydantic_core_schema__
- model_extra
- model_fields_set
- model_construct
- model_copy
- model_dump
- model_dump_json
- model_json_schema
- model_parametrized_name
- model_post_init
- model_rebuild
- model_validate
- model_validate_json
- model_validate_strings
::: pydantic.create_model
options:
show_root_heading: true
|