Monitor errors and performance issues with

SQLModel: The New ORM for FastAPI and Beyond

Episode #353, published Fri, Feb 18, 2022, recorded Mon, Jan 17, 2022.

This episode is carbon neutral.
Two frameworks that have taken the Python world by storm are FastAPI and Pydantic. Once you already have your data exchange modeled in Pydantic, you might want to use that code for storing it in the database. And, if you have DB models you might want to somehow use them to power and document the APIs built with FastAPI.

But the popular ORMs, such as SQLAlchemy and others, far predate Pydantic. But could they be put together?

Sebastián Ramírez is here to tell us the answer is yes. We're covering his project SQLModel which is the marriage between Pydantic and SQLAlchemy.

Links from the show

Sebastián Ramírez: @tiangolo

Create a SQLModel Model:
Multiple Models:

FastAPI Talk Python episode:
FastAPI Dependency Injection:

ODMantic for MongoDB:
Beanie for MongoDB:

Michael's Short video on Pydantic:
FastAPI courses by Michael:
Watch this episode on YouTube:
Episode transcripts:

--- Stay in touch with us ---
Subscribe to us on YouTube:
Follow Talk Python on Twitter: @talkpython
Follow Michael on Twitter: @mkennedy

Want to go deeper? Check out our courses

Sebastián Ramírez
Sebastián Ramírez
Sebastián Ramírez (tiangolo) is the creator of FastAPI, Typer, and other open source tools. He is currently a developer in Berlin, Germany.
Episode sponsored by
Ads served ethically
Become a friend of the show
Stay in the know and get a chance to win our contests.
See our privacy statement about email communications.