Skip to content

[ Pydantic V2 ](https://docs.pydantic.dev/2.0/blog/pydantic-v2-final/) is here
🚀! Upgrading an existing app? See the [ Migration Guide
](https://docs.pydantic.dev/2.0/migration/) for tips on essential changes from
Pydantic V1!

[ ![logo](../../logo-white.svg) ](../.. "Pydantic")

Pydantic

Models

Initializing search

[ pydantic/pydantic  ](https://github.com/pydantic/pydantic "Go to
repository")

  * [ Get Started ](../..)
  * [ Concepts ](./)
  * [ API Documentation ](../../api/base_model/)
  * [ Examples ](../../examples/secrets/)
  * [ Error Messages ](../../errors/errors/)
  * [ Integrations ](../../integrations/mypy/)
  * [ Blog ](https://blog.pydantic.dev/)
  * [ Pydantic People ](../../pydantic_people/)

[ ![logo](../../logo-white.svg) ](../.. "Pydantic") Pydantic

[ pydantic/pydantic  ](https://github.com/pydantic/pydantic "Go to
repository")

  * Get Started  Get Started 
    * [ Welcome to Pydantic  ](../..)
    * [ Why use Pydantic  ](../../why/)
    * [ Help with Pydantic  ](../../help_with_pydantic/)
    * [ Installation  ](../../install/)
    * [ Migration Guide  ](../../migration/)
    * [ Version Policy  ](../../version-policy/)
    * [ Contributing  ](../../contributing/)
    * [ Changelog  ](../../changelog/)
  * Concepts  Concepts 
    * Models  [ Models  ](./) Page contents 
      * TL;DR 
      * The long version 
      * validation 
      * Basic model usage 
        * Model methods and properties 
      * Nested models 
      * Rebuild model schema 
      * Arbitrary class instances 
        * Reserved names 
        * Nested attributes 
      * Error handling 
      * Helper functions 
        * Creating models without validation 
      * Generic models 
      * Dynamic model creation 
      * RootModel and custom root types 
      * Faux immutability 
      * Abstract base classes 
      * Field ordering 
      * Required fields 
      * Fields with non-hashable default values 
      * Fields with dynamic default values 
      * Automatically excluded attributes 
        * Class vars 
        * Private model attributes 
      * Data conversion 
      * Model signature 
      * Structural pattern matching 
      * Attribute copies 
      * Extra fields 
    * [ Fields  ](../fields/)
    * [ JSON Schema  ](../json_schema/)
    * [ JSON  ](../json/)
    * [ Types  ](../types/)
    * [ Unions  ](../unions/)
    * [ Alias  ](../alias/)
    * [ Configuration  ](../config/)
    * [ Serialization  ](../serialization/)
    * [ Validators  ](../validators/)
    * [ Dataclasses  ](../dataclasses/)
    * [ Postponed Annotations  ](../postponed_annotations/)
    * [ Strict Mode  ](../strict_mode/)
    * [ Type Adapter  ](../type_adapter/)
    * [ Validation Decorator  ](../validation_decorator/)
    * [ Conversion Table  ](../conversion_table/)
    * [ Settings Management  ](../pydantic_settings/)
    * [ Performance  ](../performance/)
    * [ Pydantic Plugins  ](../plugins/)
  * API Documentation  API Documentation 
    * Pydantic  Pydantic 
      * [ BaseModel  ](../../api/base_model/)
      * [ RootModel  ](../../api/root_model/)
      * [ Pydantic Dataclasses  ](../../api/dataclasses/)
      * [ TypeAdapter  ](../../api/type_adapter/)
      * [ Validate Call  ](../../api/validate_call/)
      * [ Fields  ](../../api/fields/)
      * [ Aliases  ](../../api/aliases/)
      * [ Configuration  ](../../api/config/)
      * [ JSON Schema  ](../../api/json_schema/)
      * [ Errors  ](../../api/errors/)
      * [ Functional Validators  ](../../api/functional_validators/)
      * [ Functional Serializers  ](../../api/functional_serializers/)
      * [ Standard Library Types  ](../../api/standard_library_types/)
      * [ Pydantic Types  ](../../api/types/)
      * [ Network Types  ](../../api/networks/)
      * [ Version Information  ](../../api/version/)
      * [ Pydantic Plugins  ](../../api/plugin/)
      * [ Annotated Handlers  ](../../api/annotated_handlers/)
    * Pydantic Core  Pydantic Core