NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #18 most downloaded on PyPI
Data validation using Python type hints
Latest stable
2.14.3
Last release 9 days ago
05 Nov 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
10 years old
211 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
do not validate extra fields when validate_assignment is on, #724 by @YaraslauZhylko
see HISTORY.rst:
validate_assignment is on, #724 by @YaraslauZhylkobreaking change: remove __getattr__ and rename __values__ to __dict__ on BaseModel, deprecation warning on use __values__ attr, attributes access spee…
ValidationError error message, #676 by @dmontagu__getattr__ and rename __values__ to __dict__ on BaseModel,
deprecation warning on use __values__ attr, attributes access speed increased up to 14 times, #712 by @BobroniumForwardRef (without self-referencing annotations) in Python 3.6, #706 by @koxudaxischema_extra in Config sub-class, #663 by @tiangoloYour coding agent can read these notes before it upgrades. Set up the MCP server →
fix json generation for EnumError, #697 by @dmontagu
EnumError, #697 by @dmontagubetter support for floating point multiple_of values, #652 by @justindujardin
multiple_of values, #652 by @justindujardinNewType and Literal, #649 by @dmontagualias_generator and field config conflict, #645 by @gmetzker and #658 by @BobroniumEnumError, #673 by @dmontagudict, json and copy, #648 by @BobroniumGenericModel for models with concrete parameterized fields, #672 by @dmontaguLiteral type, #651 by @dmontaguConfig.keep_untouched for custom descriptors support, #679 by @Bobroniuminspect.cleandoc internally to get model description, #657 by @tiangoloColor to schema generation, by @euri10see HISTORY.rst and #664 for rationale behind patch release.
see HISTORY.rst and #664 for rationale behind patch release.
__init__ are correctly processed while still allowing self as a
parameter, #644 by @lnaden and @dgasmithenforce single quotes in code, #612 by @samuelcolvin
__post_init__, #606 by @HanaasagiGenericModel, #610 by @dmontagualias_generator support, #622 by @Bobroniumself as a field name in parse_obj, #632 by @samuelcolvinsupport dataclasses.InitVar, #592 by @pfrederiks
Union when defining multiple types under an attribute's
annotation and showcase how the type-order can affect marshalling of provided values, #594 by @somada141conlist type, #583 by @hmvpfix support for JSON Schema generation when using models with circular references in Python 3.7, #572 by @tiangolo
__post_init_post_parse__ on dataclasses, #567 by @sevahopydantic.compiled on ipython, #573 by @dmontagu and @samuelcolvinStrictBool type, #579 by @cazgpbreaking change _pydantic_post_init to execute dataclass' original __post_init__ before validation, #560 by @HeavenVolkoff
_pydantic_post_init to execute dataclass' original __post_init__ before
validation, #560 by @HeavenVolkoffThis is a pre-release to test manylinux binaries.
see HISTORY.rst.
This is a pre-release to test manylinux binaries.
Not for production use.
Breaking Change: fix .dict(skip_keys=True) skipping values set via alias (this involves changing validate_model() to always returns Tuple[Dict[str, An…
IPvAnyAddress, IPvAnyInterface, IPvAnyNetwork #498 by @pilosuscreate_model, #526 by @dmontagu.dict(skip_keys=True) skipping values set via alias (this involves changing
validate_model() to always returns Tuple[Dict[str, Any], Set[str], Optional[ValidationError]]), #517 by @sommdIPv4Address, IPv6Address, IPv4Interface,
IPv6Interface, IPv4Network, IPv6Network #532 by @euri10Color type, #504 by @pilosus and @samuelcolvinImprove documentation on self-referencing models and annotations, #487 by @theenglishway
fix handling ForwardRef in sub-types, like Union, #464 by @tiangolo
ForwardRef in sub-types, like Union, #464 by @tiangoloparse_obj to cope with dict-like objects, #472 by @samuelcolvinjson for Path, FilePath, and DirectoryPath objects, #473 by @mikegoodspeedfix black deprecation warnings after update, #451 by @pilosus
IntEnum support, #444 by @potykionblack deprecation warnings after update, #451 by @pilosusForwardRef collection bug, #450 by @tigerwingsClassVars, #455 by @tyryluipaddress types, #333 by @pilosusSecretStr and SecretBytes types, #452 by @atheuzadd IPv{4,6,Any}Network and IPv{4,6,Any}Interface types from ipaddress stdlib, #333 by @pilosus
fix typo in NoneIsNotAllowedError message, #414 by @YaraslauZhylko
fix type hints of parse_obj and similar methods, #405 by @erosennin
fix tests for Python 3.8, #396 by @samuelcolvin
breaking change (maybe): more sophisticated argument parsing for validators, any subset of values, config and field is now permitted, eg. (cls, value,…
values, config and field is now permitted, eg. (cls, value, field),
however the variadic key word argument ("**kwargs") must be called kwargs, #388 by @samuelcolvinskip_defaults argument to BaseModel.dict() to allow skipping of fields that
were not explicitly set, signature of Model.construct() changed, #389 by @dgasmithpy.typed marker file for PEP-561 support, #391 by @je-lextra behaviour for multiple inheritance/mix-ins, #394 by @YaraslauZhylkoDeprecated ignore_extra and allow_extra Config fields in favor of extra, #352 by @liiight
Callable type hint, fix #279 by @proofit404validator decorator, fix #375 by @tiangolomultiple_of constraint to ConstrainedDecimal, ConstrainedFloat, ConstrainedInt
and their related types condecimal, confloat, and conint #371, thanks @StephenBrown2ignore_extra and allow_extra Config fields in favor of extra, #352 by @liiightvalidate_all or validate_always, #381 by @samuelcolvin2e10, #385 by @samuelcolvinFix to schema generation with Optional fields, fix #361 by @samuelcolvin
Optional fields, fix #361 by @samuelcolvinadd ConstrainedBytes and conbytes types, #315 @Gr1N
breaking change: don't call validators on keys of dictionaries, #254 by @samuelcolvin
always=True when the default is None or the type is optional, also prevent
whole validators being called for sub-fields, fix #132 by @samuelcolvinignore_extra=False and allow_population_by_alias=True, fix #257 by @samuelcolvinBaseConfig attributes min_anystr_length and max_anystr_length to
None by default, fix #349 in #350 by @tiangolosupport for passing Config class in dataclasses decorator, #276 by @jarekkar (breaking change: this supersedes the validate_assignment argument with c…
timedelta as number, #325 by @tiangolo: dict, : list,
: tuple and : set, #330 & #335 by @nkoninvalidate_assignment argument with config)ImportError with PyObject, #309 by @samuelcolvinget_validators to __get_validators__, deprecation warning on use of old name, #338 by @samuelcolvinClassVar by excluding such attributes from fields, #184 by @samuelcolvinfix create_model to correctly use the passed __config__, #320 by @hugoduncan
create_model to correctly use the passed __config__, #320 by @hugoduncanbreaking change: refactor schema generation to be compatible with JSON Schema and OpenAPI specs, #308 by @tiangolo
schema to schema module to generate top-level schemas from base models, #308 by @tiangoloSchema class to declare validation for str and numeric values, #311 by @tiangolo_schema to schema on fields, #318 by @samuelcolvincase_insensitive option to BaseSettings Config, #277 by @jasonkuhrtmove codebase to use black, #287 by @samuelcolvin
parse_date, #298 by @samuelcolvinPyObject = None, fix #305 by @samuelcolvinPattern type, fix #303 by @samuelcolvindataclasses decorator, #269 by @Gaunt and @samuelcolvin
fix issue where int_validator doesn't cast a bool to an int #264 by @nphyatt
raise an exception if a field's name shadows an existing BaseModel attribute #242
BaseModel attribute #242UrlStr and urlstr types #236timedelta objects as values for properties of type timedelta (matches datetime etc. behavior) #247fix schema generation for fields defined using typing.Any #237
typing.Any #237add by_alias argument in .dict() and .json() model methods #205
fix list, set & tuple validation #225
support Python 3.7 #216, thanks @layday
breaking change: remove msgpack parsing #201
breaking change: new errors format #179, thanks @Gr1N
Config.allow_population_by_alias #160, thanks @bendemareeConfig.min_number_size and Config.max_number_size #183, thanks @Gr1Nlt and gt arguments to conint etc. #188
for the old behaviour use le and ge #194, thanks @jahebaConfig.error_msg_templates #183,
thanks @Gr1Nallow custom get_field_config on config classes #159
get_field_config on config classes #159UUID1, UUID3, UUID4 and UUID5 types #167, thanks @Gr1NDecimal, ConstrainedDecimal and condecimal types #170, thanks @Gr1Ntweak email-validator import error message #145
parse_date() and parse_datetime() when input is 0 #144, thanks @YannLuoConfig.anystr_strip_whitespace and strip_whitespace kwarg to constr,
by default values is `False`` #163, thanks @Gr1NConstrainedFloat, confloat, PositiveFloat and NegativeFloat types #166, thanks @Gr1Nbreaking change: check for invalid field names in validators #140
inherit_config #139fix bug with create_model modifying the base class
create_model modifying the base classbreaking change: rename .config to .__config__ on a model
create_model method #113 #125.config to .__config__ on a model.values() on a model, use .dict() insteadOrderedDict and use simple dict #126Config.use_enum_values #127@validate('*') #128allow python date and times objects #122
fix direct install without README.rst present
README.rst presenterrors for invalid validator use
Settingsprevent duplicate validators, #101
always kwarg to validators, #102assignment validation #94, thanks petroswork!
validator decorators for complex validation, #97values(...) and replace with .dict(...), #99remove index and track from error object (json) if they're null #90
show length in string validation error
immutable models via config.allow_mutation = False, associated cleanup and performance improvement #44
config.allow_mutation = False, associated cleanup and performance improvement #44construct() and copy() #53setattr is removed as __setattr__ is now intelligent #44raise_exception removed, Models now always raise exceptions #44StrictStr which only always strings as input #52pypi and travis together messed up the deploy of v0.2 this should fix it
v0.2 this should fix itbreaking change: values() on a model is now a method not a property, takes include and exclude arguments
values() on a model is now a method not a property,
takes include and exclude argumentsto_string(pretty=True) method for models* add docs * add history
add docs
add history
Was this page helpful?
Thanks for your feedback!
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.