Async database support for Python.
Archived. The repository is read-only: no more fixes or releases will come.
pip install databasesDatabases
Databases gives you simple asyncio support for a range of databases.
It allows you to make queries using the powerful SQLAlchemy Core expression language, and provides support for PostgreSQL, MySQL, and SQLite.
Databases is suitable for integrating against any async Web framework, such as Starlette, Sanic, Responder, Quart, aiohttp, Tornado, or FastAPI.
Documentation: https://www.encode.io/databases/
Requirements: Python 3.8+
Installation
$ pip install databases
Database drivers supported are:
You can install the required database drivers with:
$ pip install databases[asyncpg]
$ pip install databases[aiopg]
$ pip install databases[aiomysql]
$ pip install databases[asyncmy]
$ pip install databases[aiosqlite]
Note that if you are using any synchronous SQLAlchemy functions such as engine.create_all() or migrations then you still have to install a synchronous DB driver: for PostgreSQL and for MySQL.