Page Body

Easy SQL in Native Python

Matthew Mayo, KDnuggets:

Do you write a lot of SQL? Do you end up calling a lot of this SQL from within Python? Does the idea of being able to link with SQL databases and define, manipulate, and query using Python sound appealing?

SQLModel is a Python library for interacting with SQL databases in pure, native Python. Its design motivations include intuitiveness, ease of use, compatibility, and robustness. SQLModel employs Python type annotation, enforced and managed by Pydantic, as well as SQLAlchemy, "Python SQL toolkit and Object Relational Mapper," for its SQL interaction.

The library was written by Sebastián Ramírez, the author of FastAPI, and the 2 libraries are designed to interoperate seamlessly.

Enjoyed this post?

Subscribe to the feed for the latest updates.