ORMs & Query Builders Packages
Object-relational mappers and SQL query builders that turn database access into type-safe, maintainable code (Prisma, SQLAlchemy, Drizzle).
Packages in ORMs & Query Builders
Kind
Sort:Used by Most Apps
SQLAlchemy
The Python SQL toolkit and Object Relational Mapper that gives developers the full power and flexibility of SQL.
Alembic
Database migrations tool for SQLAlchemy with autogenerate and transactional DDL
Django
The high-level Python web framework that turns database models into secure, working web applications in record time.
Flask-SQLAlchemy
The official SQLAlchemy integration for Flask, adding scoped sessions, multi-database binds, and Flask-aware model conventions.
SQLModel
One model for SQLAlchemy and Pydantic, built by the creator of FastAPI to kill duplicate schema code.
Apache DataFusion
The extensible, Arrow-native SQL and DataFrame query engine for building fast analytical systems in Rust.
peewee
A small, expressive Python ORM with asyncio support for SQLite, MySQL, and PostgreSQL.
prisma-client-py
Auto-generated, fully type-safe Python database client built on Prisma's schema and Rust query engine.
duckdb_engine
A SQLAlchemy dialect that lets existing SQLAlchemy code query and manage DuckDB databases unmodified.
Ibis
A portable Python dataframe library with a lazy expression API across 20+ backends.
PyPika
A Python SQL query builder that constructs expressive, vendor-flexible SQL using a fluent builder API.
beanie
Async Python ODM for MongoDB built on Pydantic, with pythonic queries, document links, caching, and schema migrations.
PynamoDB
A Pythonic, ORM-style interface to Amazon's DynamoDB.
PyHive
Python DB-API and SQLAlchemy interfaces for querying Apache Hive, Presto, and Trino.
Redis OM Python
Declarative object mapping, validation, and rich querying for Redis in Python.
django-treebeard
Efficient tree-structured models for Django, with three interchangeable storage backends behind one manager API.
SQLAlchemy-JSON
Mutation-tracked JSON column types for SQLAlchemy, including deeply nested changes.
scylla-driver
Modern, highly tunable Python client for ScyllaDB and Apache Cassandra over CQL