MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / make

Function make

tests/test_prepare.py:419–427  ·  view source on GitHub ↗

The model holding `data`, made in each of the ways a model gets made.

(data: dict[str, Any])

Source from the content-addressed store, hash-verified

417 from_: str | None = pydantic.Field(alias="from", default=None)
418
419 def make(data: dict[str, Any]) -> dict[str, MyModel]:
420 """The model holding `data`, made in each of the ways a model gets made."""
421 return {
422 "constructor": MyModel(**data),
423 "validation": model_parse(MyModel, data),
424 "construct": MyModel.construct(**data),
425 "construct_type": cast(MyModel, construct_type(type_=MyModel, value=data)),
426 "copy": model_copy(MyModel(**data)),
427 }
428
429 when = datetime(2023, 2, 23, 14, 16, 36, tzinfo=timezone.utc)
430 sent_when = "2023-02-23T14:16:36Z" if not PYDANTIC_V1 else "2023-02-23T14:16:36+00:00"

Calls 5

model_parseFunction · 0.90
construct_typeFunction · 0.90
model_copyFunction · 0.90
MyModelClass · 0.85
constructMethod · 0.45

Tested by

no test coverage detected