Should we use pydantic models? #448
extreme4all
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://fastapi.tiangolo.com/tutorial/sql-databases/#use-pydantics-orm_mode
with this, the Pydantic model is compatible with ORMs, and you can just declare it in the response_model argument in your path operations.
You will be able to return a database model and it will read the data from it.
Beta Was this translation helpful? Give feedback.
All reactions