Performance Pydantic's core validation logic is implemented in a separate package pydantic-core, where validation for most types is implemented in Rust. As a result, Pydantic is among the fastest data validation libraries for Python. ??? example "Performance Example - Pydantic vs. dedicated code"...
✅ Data is based on GitHub reports and real-world benchmarks📊 ✅ It took almost 2 YEARS to get back to v1 performance!⏳ ✅ If you use ARM processors or serverless, you're extra doomed💀 ✅ Consider Litestar + msgspec for new projects⭐ ...
Performance enum validator improvements by @samuelcolvin in #9045 Move enum validation and serialization to Rust by @samuelcolvin in #9064 Improve schema generation for nested dataclasses by @sydney-runkle in #9114 Fast path for ASCII python string creation in JSON by @samuelcolvin in in pydantic...
{ "_id": null, "home_page": null, "name": "pydantic", "maintainer": null, "docs_url": null, "requires_python": ">=3.8", "maintainer_email": null, "keywords": null, "author": null, "author_email": "Samuel Colvin , Eric Jolibois , Hasan Ramezani <hasan.r67@gmail.com>, Adr...
Add support for autocomplete in VS Code via __dataclass_transform__ when using pydantic.dataclasses.dataclass, #4006 by @giuliano-oliveira Remove benchmarks from codebase and docs, #3973 by @samuelcolvin Typing checking with pyright in CI, improve docs on vscode/pylance/pyright, #3972 by @...
Add support for autocomplete in VS Code via __dataclass_transform__ when using pydantic.dataclasses.dataclass, #4006 by @giuliano-oliveira Remove benchmarks from codebase and docs, #3973 by @samuelcolvin Typing checking with pyright in CI, improve docs on vscode/pylance/pyright, #3972 by @...
Add support for autocomplete in VS Code via __dataclass_transform__ when using pydantic.dataclasses.dataclass, #4006 by @giuliano-oliveira Remove benchmarks from codebase and docs, #3973 by @samuelcolvin Typing checking with pyright in CI, improve docs on vscode/pylance/pyright, #3972 by @...
importtimeitfromtypingimportLiteral,AnnotatedfrompydanticimportDiscriminator,TypeAdapter,BaseModelfrompydantic.dataclassesimportdataclass@dataclass(frozen=True,kw_only=True)classCat:type:Literal["cat"]="cat"@dataclass(frozen=True,kw_only=True)classDog:type:Literal["dog"]="dog"@dataclass(frozen=True,kw_...
Data validation using Python type hints. Contribute to pydantic/pydantic development by creating an account on GitHub.
Similarly, if using the [`@dataclass`][pydantic.dataclasses] decorator from Pydantic: ```python @@ -142,7 +142,7 @@ class Parent(BaseModel): class Model(Parent): model_config = ConfigDict(str_to_lower=True) # (1)! model_config = ConfigDict(str_to_lower=True) x: str 1 change:...