Skip to content

pydantic_core

ArgsKwargs

MultiHostUrl

Bases: SupportsAllComparisons

PydanticCustomError

Bases: ValueError

PydanticKnownError

Bases: ValueError

PydanticOmit

Bases: Exception

PydanticSerializationError

Bases: ValueError

PydanticSerializationUnexpectedValue

Bases: ValueError

SchemaError

Bases: Exception

SchemaError

Bases: Exception

SchemaSerializer

SchemaValidator

validate_assignment

validate_assignment(
    obj,
    field_name,
    field_value,
    *,
    strict=None,
    from_attributes=None,
    context=None
)

ModelValidator and ModelFieldsValidator will return a tuple of (fields data, extra data, fields set)

Some

Bases: Generic[_T]

Url

Bases: SupportsAllComparisons

ValidationError

Bases: ValueError

from_exception_data staticmethod

from_exception_data(
    title,
    line_errors,
    error_mode="python",
    hide_input=False,
)

Provisory constructor for a Validation Error. This API will probably change and be deprecated in the the future; we will make it easier and more powerful to construct and use ValidationErrors, but we cannot do that before our initial Pydantic V2 release. So if you use this method please be aware that it may change or be removed before Pydantic V3.

to_json

to_json(
    value,
    *,
    indent=None,
    include=None,
    exclude=None,
    by_alias=True,
    exclude_none=False,
    round_trip=False,
    timedelta_mode="iso8601",
    bytes_mode="utf8",
    serialize_unknown=False,
    fallback=None
)

to_jsonable_python

to_jsonable_python(
    value,
    *,
    include=None,
    exclude=None,
    by_alias=True,
    exclude_none=False,
    round_trip=False,
    timedelta_mode="iso8601",
    bytes_mode="utf8",
    serialize_unknown=False,
    fallback=None
)