3 ms·
I've used multiple names for similar packages incl. `models` and `schemas`. :-) Yes, for this example, I picked `models` to follow Pydantic's terminology. IMO,
by rekahrv 4y ago
I've used multiple names for similar packages incl. `models` and `schemas`. :-)
Yes, for this example, I picked `models` to follow Pydantic's terminology.
IMO, the FastAPI approach you described makes a lot of sense:
The "schema" stored in the db and the "schema" returned by the API aren't the same, but they are quite similar. They have many common properties => They can often have a common base class.
- deleted 4y ago[deleted]