- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for from_attributes (0.43 sec)
-
tests/test_read_with_orm_mode.py
def full_name(self) -> str: return f"{self.name} {self.lastname}" model_config = ConfigDict(from_attributes=True) class PersonCreate(PersonBase): pass class PersonRead(PersonBase): full_name: str model_config = {"from_attributes": True} app = FastAPI() @app.post("/people/", response_model=PersonRead)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 1.2K bytes - Viewed (0) -
fastapi/_compat/v2.py
*, loc: tuple[Union[int, str], ...] = (), ) -> tuple[Any, Union[list[dict[str, Any]], None]]: try: return ( self._type_adapter.validate_python(value, from_attributes=True), None, ) except ValidationError as exc: return None, _regenerate_error_with_loc( errors=exc.errors(include_url=False), loc_prefix=locRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 19.1K bytes - Viewed (0)