4 ms·
The main benefit is actually being able to have statically typed models instead of dynamic, to get autocompletion, error checks, etc. In fact, I made a small u
by tiangolo 5y ago
The main benefit is actually being able to have statically typed models instead of dynamic, to get autocompletion, error checks, etc.
In fact, I made a small utility library some time ago to create dynamic Pydantic models from SQLAlchemy models (https://github.com/tiangolo/pydantic-sqlalchemy https://github.com/tiangolo/pydantic-sqlalchemy), but that's only useful in a few cases, e.g. for response_model in FastAPI.