hopsworks-aiomysql
MySQL driver for asyncio.
What it is and what it does
hopsworks-aiomysql is an async MySQL driver that wraps PyMySQL to provide non-blocking database access within Python's asyncio framework. It reuses most of PyMySQL's implementation but replaces blocking I/O calls with async equivalents, allowing you to query MySQL or MariaDB without blocking your event loop. The package maintains API compatibility with PyMySQL—you simply await method calls instead of calling them synchronously—and includes optional SQLAlchemy integration for ORM users.
The package is designed for applications that need to handle many concurrent database connections efficiently, such as web services or async data pipelines. It supports connection pooling, SSL connections, multiple authentication methods including sha256_password and caching_sha2_password, and both standard and server-side cursors. Python 3.7+ is required.
Use it for:
- Building async web services (FastAPI, aiohttp) that query MySQL without blocking the event loop.
- Concurrent data ingestion or batch processing where multiple async tasks read from or write to MySQL simultaneously.
- SQLAlchemy-based async applications needing a MySQL backend with the aiomysql.sa integration layer.
- Connection pooling for high-concurrency scenarios where traditional synchronous drivers would exhaust system resources.
- Microservices or serverless functions that must minimize latency by avoiding blocking database calls.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Async MySQL database driver for Python asyncio applications, providing a non-blocking interface to MySQL and MariaDB servers.
Yes, with conditions. The package is stable and has no known vulnerabilities, with permissive MIT licensing. However, the 381-day gap since the last release and aging maintenance status suggest it may not receive prompt updates for new MySQL/MariaDB features or Python versions. Install it if you need async MySQL access in an asyncio application and are comfortable with a package that updates infrequently; avoid it if you require active, rapid maintenance or cutting-edge compatibility.
Install
hopsworks-aiomysql on PyPI
pip
pip install hopsworks-aiomysqluv
uv add hopsworks-aiomysqlpoetry
poetry add hopsworks-aiomysqlInstalling hopsworks-aiomysql
Before you install
Low install friction with a single runtime dependency (PyMySQL). Maintenance status is aging—last release was 381 days ago, though the repository remains active with a recent commit on 2025-07-29.
License in practice
MIT license is permissive; you can use this package freely in commercial and open-source projects with minimal restrictions.
Quickstart
import asyncio
import aiomysql
async def query_mysql():
pool = await aiomysql.create_pool(host='127.0.0.1', user='root', db='mydb')
async with pool.acquire() as conn:
async with conn.cursor() as cur:
await cur.execute('SELECT 1')
result = await cur.fetchone()
pool.close()
await pool.wait_closed()
asyncio.run(query_mysql())
Requires a running MySQL or MariaDB server accessible at the specified host and port; Python 3.7+ is required.
Verify before relying
- Whether hopsworks-aiomysql is a maintained fork or the canonical aiomysql package, and if there are differences in API or support.
- Current test coverage and compatibility status with MySQL 8.0+ and recent MariaDB versions.
- Whether the 381-day gap since last release indicates active maintenance or dormancy.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — PyMySQL |
| Maintenance | aging — 381 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 137,797/month — #11,355 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: hopsworks_aiomysql-0.2.2-py3-none-any.whl
Keywords: mysql, mariadb, asyncio, aiomysql
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
aiomysqlaiomysql provides async/await access to MySQL…
permissive · top 5,000 on PyPI
asyncmyasyncmy is an asyncio-native MySQL/MariaDB…
permissive · top 5,000 on PyPI
aiopgaiopg provides asyncio-based access to…
permissive · top 15,000 on PyPI
asyncmy2asyncmy2 is a fast asyncio-based MySQL/MariaDB…
permissive · top 15,000 on PyPI
databasesProvides async database access for PostgreSQL,…
permissive · top 5,000 on PyPI
aioodbcaioodbc provides async/await access to ODBC…
permissive · top 5,000 on PyPI
aiosqlLoad SQL queries from files and call them as…
permissive · top 15,000 on PyPI
PyMySQLPyMySQL is a pure-Python MySQL and MariaDB…
permissive · top 1,000 on PyPI
mysqlclientmysqlclient provides a Python interface to…
copyleft · top 1,000 on PyPI
asynchasynch is an asynchronous ClickHouse driver…
permissive · top 5,000 on PyPI