MCPcopy
hub / github.com/pydantic/pydantic / State

Class State

tests/test_deprecated.py:266–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264 last_name: str
265
266 class State(BaseModel):
267 model_config = ConfigDict(from_attributes=True)
268 user: User
269
270 # Pass an "orm instance"
271 deprecated_from_orm(State, SimpleNamespace(user=SimpleNamespace(first_name='John', last_name='Appleseed')))

Callers 1

test_nested_ormFunction · 0.85

Calls 1

ConfigDictClass · 0.90

Tested by 1

test_nested_ormFunction · 0.68