Async database support for Python with SQLAlchemy Core, supporting PostgreSQL, MySQL, and SQLite.
Databases is an async database library for Python that provides simple asyncio support for PostgreSQL, MySQL, and SQLite. It enables developers to execute database queries using SQLAlchemy Core's expression language while maintaining full async compatibility. The library solves the problem of integrating asynchronous database operations with modern Python web frameworks.
Python developers building async web applications with frameworks like Starlette, FastAPI, Sanic, or aiohttp who need efficient database interactions. It's also suitable for developers who prefer SQLAlchemy Core's query-building capabilities but require async support.
Developers choose Databases because it offers a clean, async-first API that works seamlessly with SQLAlchemy Core, eliminating the need to mix sync and async database drivers. Its framework-agnostic design and support for multiple async database drivers make it a versatile choice for modern Python applications.
Async database support for Python. 🗄
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides native asyncio compatibility for PostgreSQL, MySQL, and SQLite using drivers like asyncpg and aiosqlite, enabling non-blocking operations as shown in the quickstart example.
Leverages SQLAlchemy Core's expression language for building queries, allowing complex query construction while maintaining async execution, as highlighted in the documentation.
Works seamlessly with any async Python web framework, including FastAPI, Starlette, and Sanic, as stated in the README's compatibility list.
Simple pip installation with extras for different database drivers, making it straightforward to set up and switch between backends, as detailed in the installation section.
Only integrates with SQLAlchemy Core, so advanced ORM features like models, relationships, and automatic session management are unavailable, requiring manual data handling.
For tasks like Alembic migrations or engine creation, separate synchronous drivers like psycopg2 must be installed, adding complexity to the setup as noted in the README.
Restricted to PostgreSQL, MySQL, and SQLite with specific async drivers, which may not cover all database systems or integrate with newer async technologies beyond the listed ones.