News for hackers. Stuff that matters.
Re:SQLModel – SQL Databases in FastAPI by faizshah on Tuesday August 24, 2021 @10:45PM (#28297507)
Would this support pydantic dynamic models? https://pydantic-docs.helpmanual.io/usage/models/#dynamic-mo...

Or rather can I pass an existing pydantic class to SQLModel somehow?

Re:SQLModel – SQL Databases in FastAPI by tiangolo on Wednesday August 25, 2021 @06:56AM (#28300013)
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), but that's only useful in a few cases, e.g. for response_model in FastAPI.