- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for from_attributes (0.1 seconds)
-
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)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 1.2K bytes - Click Count (0) -
fastapi/_compat/v2.py
*, loc: tuple[int | str, ...] = (), ) -> tuple[Any, list[dict[str, Any]]]: try: return ( self._type_adapter.validate_python(value, from_attributes=True), [], ) except ValidationError as exc: return None, _regenerate_error_with_loc( errors=exc.errors(include_url=False), loc_prefix=locCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 16.7K bytes - Click Count (0)