- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for read_with_orm_mode (0.1 sec)
-
tests/test_read_with_orm_mode.py
class Person(PersonBase): @property def full_name(self) -> str: return f"{self.name} {self.lastname}" class Config: orm_mode = True read_with_orm_mode = True class PersonCreate(PersonBase): pass class PersonRead(PersonBase): full_name: str class Config: orm_mode = True app = FastAPI()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 2.4K bytes - Viewed (0) -
fastapi/routing.py
*, exclude_unset: bool, exclude_defaults: bool = False, exclude_none: bool = False, ) -> Any: if isinstance(res, BaseModel): read_with_orm_mode = getattr(_get_model_config(res), "read_with_orm_mode", None) if read_with_orm_mode: # Let from_orm extract the data from this model instead of converting # it now to a dict.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:44:57 UTC 2024 - 172.1K bytes - Viewed (0) -
docs/en/docs/release-notes.md
* 🔧 Add new Sponsor Calmcode.io. PR [#3777](https://github.com/tiangolo/fastapi/pull/3777) by [@tiangolo](https://github.com/tiangolo). ## 0.68.1 * ✨ Add support for `read_with_orm_mode`, to support [SQLModel](https://sqlmodel.tiangolo.com/) relationship attributes. PR [#3757](https://github.com/tiangolo/fastapi/pull/3757) by [@tiangolo](https://github.com/tiangolo). ### Translations
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Nov 01 11:25:57 UTC 2024 - 460.3K bytes - Viewed (0)