Description |
pydantic-core
This package provides the core functionality for pydantic validation and serialization.
Pydantic-core is currently around 17x faster than pydantic V1.
See tests/benchmarks/ for details.
Example of direct usage
NOTE: You should not need to use pydantic-core directly; instead, use pydantic, which in turn uses pydantic-core.
from pydantic_core import SchemaValidator, ValidationError
v = SchemaValidator(
{
'type': typed-dict ,
'fields': {
'name': {
'type': typed-dict-field ,
'schema': {
'type': str ,
},
},
'age': {
'type': typed-dict-field ,
'schema': {
'type': int ,
'ge': 18,
},
},
'is_developer': {
'type': typed-dict-field ,
'schema': {
'type': default ,
'sc
|