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 |
| SQLModel | Combines database models with type-safe data validation |
| Tortoise | Easy-to-use asyncio ORM inspired by Django |
| Pony | Billed as the smartest Python ORM |
| Piccolo | Async-first database toolkit with migrations and a powerful query API |
| SQLObject | Forms a part of many applications including TurboGears |
| ormar | Build expressive async database models with minimal boilerplate |
| Edgy | Modern async database layer focused on simplicity and flexibility |
| Saffier | Lightweight async data modelling with support for multiple databases |
| Storm | Designed to work with thin relational databases and big systems |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.