Skip to content
masterclass Buddy

Pydantic · Type Alias

Annotated

Annotated combines a Python type with metadata that Pydantic uses for validation, serialization, or JSON Schema. It is a way to define reusable custom types without making a subclass.

Last updated

Syntax

Annotated[type, metadata1, metadata2, ...]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Field
  • AfterValidator
  • BeforeValidator
  • PlainValidator
  • WrapValidator
  • WithJsonSchema
  • TypeAliasType
  • GetPydanticSchema

Source: Types/custom | Pydantic Docs. Checked 2026-11-03.