MCPcopy
hub / github.com/pydantic/pydantic / parse_obj

Method parse_obj

pydantic/main.py:1383–1389  ·  view source on GitHub ↗
(cls, obj: Any)

Source from the content-addressed store, hash-verified

1381 @classmethod
1382 @typing_extensions.deprecated('The `parse_obj` method is deprecated; use `model_validate` instead.', category=None)
1383 def parse_obj(cls, obj: Any) -> Self: # noqa: D102
1384 warnings.warn(
1385 'The `parse_obj` method is deprecated; use `model_validate` instead.',
1386 category=PydanticDeprecatedSince20,
1387 stacklevel=2,
1388 )
1389 return cls.model_validate(obj)
1390
1391 @classmethod
1392 @typing_extensions.deprecated(

Callers 2

parse_fileMethod · 0.45
test_parse_objFunction · 0.45

Calls 1

model_validateMethod · 0.80

Tested by 1

test_parse_objFunction · 0.36