skillfed

hopsworks-aiomysql

MySQL driver for asyncio.

hopsworks-aiomysql v0.2.2 137.8K downloads/30d#11,355 on PyPI0
Permissive license MIT AGING released

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-aiomysql

uv

uv add hopsworks-aiomysql

poetry

poetry add hopsworks-aiomysql

Installing 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

Development Status :: 3 - AlphaEnvironment :: Web EnvironmentFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: POSIXProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: DatabaseTopic :: Database :: Front-Ends

Tags

async mysql driverasyncio database connectornon-blocking mysql clientasync mariadb driverasyncio mysql poolasync database accesscoroutine mysql connection
async-iomysql-driverconnection-pooling

More Database packages