SQLModel is a Python object-relational mapping library designed to simplify interaction with SQL databases. It combines SQLAlchemy’s database capabilities with Pydantic’s data validation and type system.
The library lets developers define database tables and data models using standard Python type annotations. A single model can serve as a SQLAlchemy table model and a Pydantic data model, reducing duplication and making SQLModel particularly well suited to FastAPI applications.
This is free and open source software.
Key Features
- Defines database models using standard Python classes and type annotations.
- Combines the capabilities of SQLAlchemy and Pydantic.
- Offers strong editor support, including autocompletion and inline type checking.
- Reduces duplication between database tables and API data models.
- Integrates closely with FastAPI.
- Provides sensible defaults while retaining access to SQLAlchemy’s advanced features.
- Supports data validation, serialization and conversion through Pydantic.
- Creates, queries and updates SQL database records using Python objects.
- Supports synchronous and asynchronous database applications.
- Works with database engines supported by SQLAlchemy.
Website: github.com/fastapi/sqlmodel
Support:
Developer: Sebastián Ramírez
License: MIT License
SQLModel is written in Python. Learn Python with our recommended free books and free tutorials.
Related Software
| Python Object-Relational Mapping Software | |
|---|---|
| Django | High-level web application framework that has a powerful ORM |
| SQLAlchemy | Python SQL Toolkit and Object Relational Mapper |
| Peewee | Simple, small and expressive Object Relational Mapper. It has few concepts |
| Tortoise | Easy-to-use asyncio ORM inspired by Django |
| Pony | Billed as the smartest Python ORM |
| SQLObject | Forms a part of many applications including TurboGears |
| Storm | Designed to work with thin relational databases and big systems |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |


Please read our Comment Policy before commenting.