Python ORMs and database drivers
SQLAlchemy, psycopg, redis-py and other ways to talk to a database from Python
अपडेट · GitHub stars (stars)
ये 20 ही क्यों
Ranked by GitHub stars: how many developers bookmarked the project. Stars measure attention, not quality, so each row also shows forks, licence, the last push and the section of the community list it sits in. ORMs (SQLAlchemy, Peewee, SQLModel) and plain drivers (psycopg, asyncpg, PyMySQL) answer different needs and are in one list, so check the 'listed under' column. Drivers are often used through an ORM, so their stars undercount how much they run. Python's built-in sqlite3 has no repository of its own and can't be ranked.
-
1
sqlmodel
SQLModel is based on Python type annotations, and powered by Pydantic and SQLAlchemy.
18,722 stars 901 forkslast push 2026-11-26PythonMIT
-
2
-
3
sqlalchemy
The Python SQL Toolkit and Object Relational Mapper.
12,314 stars 1,996 forkslast push 2026-11-30PythonMIT
-
4
-
5
asyncpg
A fast PostgreSQL database client library for Python/asyncio.
8,123 stars 487 forkslast push 2026-10-08PythonApache-2.0
-
6
pymysql
A pure-Python MySQL and MariaDB client library, based on PEP 249.
7,856 stars 1,451 forkslast push 2026-11-09PythonMIT
-
7
PyMongo
Official Python driver
4,363 stars 1,171 forkslast push 2026-11-30PythonApache-2.0
इसमें भी: #6 MongoDB libraries
-
8
-
9
pyodbc
An ODBC bridge for connecting to SQL Server and any other ODBC-accessible database.
3,088 stars 571 forkslast push 2026-11-29C++MIT-0
-
10
beanie
An asynchronous Python object-document mapper (ODM) for MongoDB.
2,713 stars 309 forkslast push 2026-11-28PythonApache-2.0
इसमें भी: #8 FastAPI extensions
-
11
pynamodb
A Pythonic interface for Amazon DynamoDB.
2,644 stars 432 forkslast push 2026-05-29PythonMIT
इसमें भी: #9 FastAPI extensions
-
12
psycopg ▲1
A PostgreSQL adapter for Python, the successor to psycopg2.
2,545 stars 318 forkslast push 2026-11-29PythonLGPL-3.0
-
13
mysqlclient ▼1
MySQL and MariaDB connector (MySQLdb1 fork).
2,544 stars 445 forkslast push 2026-11-18PythonGPL-2.0
-
14
sqlite-utils
Python CLI utility and library for manipulating SQLite databases.
2,270 stars 249 forkslast push 2026-11-30PythonApache-2.0
इसमें भी: #7 database command-line clients
-
15
pgvector
pgvector support for Python, adding vector types and similarity search to psycopg, asyncpg, SQLAlchemy, and Django.
1,548 stars 106 forkslast push 2026-11-05PythonMIT
-
16
cassandra-driver
The Python driver for Apache Cassandra.
1,427 stars 602 forkslast push 2026-11-20PythonApache-2.0
-
17
clickhouse-driver
Python driver with native interface for ClickHouse.
1,306 stars 249 forkslast push 2026-07-22PythonNOASSERTION
-
18
apsw
Another Python SQLite Wrapper, exposing the complete SQLite C API.
958 stars 111 forkslast push 2026-11-23CNOASSERTION
-
19
clickhouse-connect
The official ClickHouse client, with SQLAlchemy and Superset connectors.
535 stars 184 forkslast push 2026-11-30PythonApache-2.0
-
20
mssql-python
Official Microsoft driver for SQL Server and Azure SQL.
485 stars 64 forkslast push 2026-11-30PythonNOASSERTION
साथ-साथ तुलना
| Licence | Platforms | What it does | Python versions | Async support | Type hints | Plugins and ecosystem | Best for | |
|---|---|---|---|---|---|---|---|---|
| MIT License | Cross-platform (Linux, macOS, Windows) | SQL database library combining SQLAlchemy ORM and Pydantic validation models | Python >= 3.8 | – | – | – | – | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Official Python client library for connecting to Redis databases | Python >= 3.10 | Yes, provides a built-in asyncio client module | Yes, fully type annotated with PEP 561 py.typed marker | Celery, hiredis, redis-om-python, Django Redis | Connecting Python applications to Redis for caching, queues, and storage | |
| MIT License | Cross-platform (Linux, macOS, Windows) | SQL toolkit and Object Relational Mapper for Python | Python >= 3.8 | Yes, provides an asyncio extension for asynchronous engines and sessions | Yes, full native type hints and PEP 484 support | Alembic, Flask-SQLAlchemy, SQLModel, GeoAlchemy2 | Enterprise-grade relational database modeling and complex SQL generation | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Small, expressive Object Relational Mapper supporting SQLite, MySQL, and PostgreSQL | Python >= 3.8 | No native async; available via community package peewee-async | Partial; lacks comprehensive native type annotations | – | Lightweight applications, microservices, and rapid relational database scripting | |
| Apache License 2.0 | Cross-platform (Linux, macOS, Windows) | Fast asynchronous PostgreSQL client library for Python and asyncio | Python >= 3.8 | Yes, designed natively for asyncio without synchronous blocking operations | Yes, ships with py.typed marker and type annotations | SQLAlchemy asyncio, Tortoise ORM, Gino, asyncpg-listen | High-throughput asynchronous PostgreSQL operations in asyncio applications | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Pure-Python client library for MySQL and MariaDB, based on PEP 249 | Python >= 3.8 | No, synchronous DB-API 2.0 driver | Partial; available via third-party package types-PyMySQL | SQLAlchemy, Django, cryptography, DB-API 2.0 tools | Pure-Python MySQL connectivity without C compiler or client library dependencies | |
| Apache License 2.0 | Cross-platform (Linux, macOS, Windows) | Official Python driver and toolset for MongoDB databases | Python >= 3.9 | Yes, native async support in modern versions and Motor integration | Yes, includes comprehensive inline typing and py.typed marker | Motor, MongoEngine, PyMongoArrow, BSON tools | Standard MongoDB interactions and general document database connectivity in Python | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Document-Object Mapper for working with MongoDB from Python | Python >= 3.8 | No, operates synchronously on top of PyMongo | Partial; limited native typing support across document fields | Flask-MongoEngine, Marshmallow-MongoEngine, Django integration, PyMongo | Synchronous applications needing declarative MongoDB document models and validation | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Python DB-API 2.0 module for connecting to ODBC-accessible databases | Python >= 3.8 | No, synchronous DB-API 2.0 driver | Partial; available via third-party package types-pyodbc | SQLAlchemy, unixODBC, Microsoft ODBC drivers, FreeTDS | Accessing enterprise databases like SQL Server via standard ODBC drivers | |
| Apache License 2.0 | Cross-platform (Linux, macOS, Windows) | Asynchronous Python ODM for MongoDB based on Motor and Pydantic | Python >= 3.8 | Yes, natively asynchronous built directly on top of Motor | Yes, built natively on Pydantic type annotations | FastAPI, Pydantic, Motor, MongoDB migrations | Asynchronous MongoDB applications using FastAPI and Pydantic schemas | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Pythonic object-mapper interface for Amazon DynamoDB | Python >= 3.8 | No, synchronous interface built over Botocore | Yes, includes py.typed marker and model type annotations | Botocore, AWS SDK, Marshmallow, signals | Declarative modeling and querying of Amazon DynamoDB tables in Python | |
| GPLv2 License | Cross-platform (Linux, macOS, Windows) | C-extension MySQL and MariaDB client library implementing DB-API 2.0 | Python >= 3.8 | No, synchronous C-based DB-API 2.0 driver | Partial; provided via third-party package types-mysqlclient | Django MySQL backend, SQLAlchemy, libmysqlclient | High-performance MySQL and MariaDB database connectivity in Django and SQLAlchemy | |
| LGPLv3 License | Cross-platform (Linux, macOS, Windows) | PostgreSQL database adapter for Python offering sync and async capabilities | Python >= 3.8 | Yes, native async connection and cursor support via asyncio | Yes, fully type-annotated with PEP 484 and py.typed | SQLAlchemy, Django, connection pooling (psycopg-pool), pgvector | Modern PostgreSQL connectivity supporting concurrent sync, async, and binary protocols | |
| Apache License 2.0 | Cross-platform (Linux, macOS, Windows) | CLI utility and Python library for manipulating SQLite databases | Python >= 3.8 | – | Yes, includes type annotations in codebase | – | – | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Provides pgvector extension support and vector types for Python drivers | Python >= 3.10 | Yes, supports asyncpg and psycopg async connections | Yes, type annotated with strict mypy and pyright verification | SQLAlchemy, psycopg, asyncpg, Django, Peewee, NumPy | Vector similarity search and embedding storage in PostgreSQL with Python | |
| Apache License 2.0 | Cross-platform (Linux, macOS, Windows) | Official client driver for Apache Cassandra and DataStax Enterprise | Python >= 3.8 | – | Partial; limited inline typing annotations | Cython, Twisted, Gevent, Eventlet, Apache Cassandra | Distributed high-throughput read and write operations on Cassandra clusters | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Python driver with native binary interface for ClickHouse database | Python >= 3.7 | No native async; available through external library asynch | Partial; basic type annotations present without complete typing stubs | Cython, clickhouse-sqlalchemy, Pandas, NumPy, LZ4 | High-throughput binary protocol queries and ingestion into ClickHouse | |
| zlib/libpng License | Cross-platform (Linux, macOS, Windows) | Python wrapper providing direct access to the SQLite C API | Python >= 3.8 | No, synchronous C-level bindings directly tracking SQLite C API | Yes, full type hints and complete typing stub files included | SQLite C extensions, Virtual Table mechanism, custom VFS | Advanced SQLite features requiring direct C API access and custom extensions | |
| Apache License 2.0 | Cross-platform (Linux, macOS, Windows) | Official ClickHouse client with HTTP interface, SQLAlchemy dialect, and Superset connector | Python >= 3.8 | No, synchronous client utilizing ClickHouse HTTP API | Yes, type annotations provided across the codebase | Pandas, PyArrow, NumPy, Apache Superset, SQLAlchemy | Data science analytics workflows connecting ClickHouse to Pandas and Superset | |
| MIT License | Cross-platform (Windows, Linux, macOS) | Official Microsoft DB-API driver for SQL Server and Azure SQL | Python >= 3.10 | No, synchronous PEP 249 DB-API implementation | Yes, provides type annotations compliant with DB-API specifications | SQLAlchemy dialect, Microsoft Entra ID, Apache Arrow | Connecting Python to SQL Server and Azure SQL without external pyodbc setup |
हर खाना टूल की अपनी साइट, डॉक्स या रिपॉज़िटरी से लिया गया है; पेज संदर्भों में हैं।
संदर्भ
- vinta/awesome-python: ORM and Database Drivers, GitHub community list (list text CC BY 4.0; star counts from the GitHub API). Checked 2026-11-30 18:09 UTC.
- vinta/awesome-python (ORM, Database Drivers), GitHub community list, 22 tools with a public repository.
- sqlmodel: licence, github.com, checked 2026-11-15.
- sqlmodel: platforms, pypi.org, checked 2026-11-15.
- sqlmodel: what it does, github.com, checked 2026-11-15.
- redis: licence, github.com, checked 2026-11-15.
- redis: platforms, pypi.org, checked 2026-11-15.
- redis: what it does, github.com, checked 2026-11-15.
- redis: python versions, github.com, checked 2026-11-15.
- sqlalchemy: licence, github.com, checked 2026-11-15.
- sqlalchemy: platforms, pypi.org, checked 2026-11-15.
- sqlalchemy: what it does, sqlalchemy.org, checked 2026-11-15.
- sqlalchemy: async support, docs.sqlalchemy.org, checked 2026-11-15.
- sqlalchemy: type hints, docs.sqlalchemy.org, checked 2026-11-15.
- peewee: licence, github.com, checked 2026-11-15.
- peewee: platforms, pypi.org, checked 2026-11-15.
- peewee: what it does, github.com, checked 2026-11-15.
- asyncpg: licence, github.com, checked 2026-11-15.
- asyncpg: platforms, pypi.org, checked 2026-11-15.
- asyncpg: what it does, github.com, checked 2026-11-15.
- pymysql: licence, github.com, checked 2026-11-15.
- pymysql: platforms, pypi.org, checked 2026-11-15.
- pymysql: what it does, github.com, checked 2026-11-15.
- PyMongo: licence, github.com, checked 2026-11-15.
- PyMongo: platforms, pypi.org, checked 2026-11-15.
- PyMongo: what it does, github.com, checked 2026-11-15.
- PyMongo: async support, pymongo.readthedocs.io, checked 2026-11-15.
- MongoEngine: licence, github.com, checked 2026-11-15.
- MongoEngine: platforms, pypi.org, checked 2026-11-15.
- MongoEngine: what it does, github.com, checked 2026-11-15.
- MongoEngine: plugins and ecosystem, mongoengine-odm.readthedocs.io, checked 2026-11-15.
- pyodbc: licence, github.com, checked 2026-11-15.
- pyodbc: platforms, pypi.org, checked 2026-11-15.
- pyodbc: what it does, github.com, checked 2026-11-15.
- Beanie: licence, github.com, checked 2026-11-15.
- Beanie: platforms, pypi.org, checked 2026-11-15.
- Beanie: what it does, github.com, checked 2026-11-15.
- Beanie: async support, beanie-odm.dev, checked 2026-11-15.
- PynamoDB: licence, github.com, checked 2026-11-15.
- PynamoDB: platforms, pypi.org, checked 2026-11-15.
- PynamoDB: what it does, github.com, checked 2026-11-15.
- PynamoDB: async support, pynamodb.readthedocs.io, checked 2026-11-15.
- mysqlclient: licence, github.com, checked 2026-11-15.
- mysqlclient: platforms, pypi.org, checked 2026-11-15.
- mysqlclient: what it does, github.com, checked 2026-11-15.
- psycopg: licence, github.com, checked 2026-11-15.
- psycopg: platforms, pypi.org, checked 2026-11-15.
- psycopg: what it does, psycopg.org, checked 2026-11-15.
- psycopg: async support, psycopg.org, checked 2026-11-15.
- psycopg: type hints, psycopg.org, checked 2026-11-15.
- sqlite-utils: licence, github.com, checked 2026-11-15.
- sqlite-utils: platforms, pypi.org, checked 2026-11-15.
- sqlite-utils: what it does, github.com, checked 2026-11-15.
- pgvector: licence, github.com, checked 2026-11-15.
- pgvector: platforms, pypi.org, checked 2026-11-15.
- pgvector: what it does, github.com, checked 2026-11-15.
- pgvector: python versions, github.com, checked 2026-11-15.
- cassandra-driver: licence, github.com, checked 2026-11-15.
- cassandra-driver: platforms, pypi.org, checked 2026-11-15.
- cassandra-driver: what it does, github.com, checked 2026-11-15.
- clickhouse-driver: licence, github.com, checked 2026-11-15.
- clickhouse-driver: platforms, pypi.org, checked 2026-11-15.
- clickhouse-driver: what it does, github.com, checked 2026-11-15.
- apsw: licence, github.com, checked 2026-11-15.
- apsw: platforms, pypi.org, checked 2026-11-15.
- apsw: what it does, rogerbinns.github.io, checked 2026-11-15.
- clickhouse-connect: licence, github.com, checked 2026-11-15.
- clickhouse-connect: platforms, pypi.org, checked 2026-11-15.
- clickhouse-connect: what it does, github.com, checked 2026-11-15.
- mssql-python: licence, github.com, checked 2026-11-15.
- mssql-python: platforms, pypi.org, checked 2026-11-15.
- mssql-python: what it does, github.com, checked 2026-11-15.
- mssql-python: python versions, learn.microsoft.com, checked 2026-11-15.