Pydantic · Method
TypeAdapter.validate_python
TypeAdapter validates, serializes, and generates JSON schemas for a type without a BaseModel. It works with collections, primitive types, dataclasses, and other Pydantic-compatible types.
Last updated
Syntax
def validate_python(
object: Any,
/,
*,
strict: bool | None = None,
from_attributes: bool | None = None,
context: dict[str, Any] | None = None,
) -> TIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
BaseModelRootModelvalidate_jsonvalidate_stringsget_default_valuedump_jsonrebuild