pydantic-core
pydantic-core copied to clipboard
Core validation logic for pydantic written in rust
Firstly, thank you for all of the work on `pydantic-core`. It's wonderful to be able to hook into this for fast validation in stuff not using Pydantic models directly ❤️...
## Change Summary Make it possible to re-use schema validators; the ultimate inlined definition! ## Related issue number N/A ## Checklist * [ ] Unit tests for the changes exist...
# Overview I am trying to parse a ~2.5GB JSON data file containing a list of lists of data (think Array of Array of Structs). Using the recommended approach of...
Is it possible that the below type stub is incorrect? https://github.com/pydantic/pydantic-core/blob/6a139753af85fc7bb6b34f26c1328994506f94ee/python/pydantic_core/_pydantic_core.pyi#L174-L183 In the below example the returned value seems to be `a` of type `A`. ```py from pydantic import BaseModel...
The `tagged_union_schema` function in pydantic_core.core_schema is currently typed as ```py def tagged_union_schema( choices: Dict[Hashable, CoreSchema], discriminator: str | list[str | int] | list[list[str | int]] | Callable[[Any], Hashable], *, custom_error_type:...
## Basic System Info - python version: 3.11.2 - pydantic version: 2.0.2 - Platform: MacOS 13.2.1 M2 chip ## Description The `exclude` keyword argument of `model_dump` function does not work...
~~See https://github.com/pydantic/pydantic/discussions/6893#discussioncomment-6561902~~ ~~(EDIT by @davidhewitt - the above related to validators, and is fixed after #844)~~ It would be nice if errors within functional serializers showed a traceback with both...
This moves constraints out of the parsing validators and into their own thing so that they can be re-ordered and to simplify core schema creation on the pydantic Python side.