$npx skillfedfor your agent

aiomysql

MySQL driver for asyncio.

Worth itPyPI DatabaseReleased Oct 202516.8M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — aiomysql-0.3.2-py3-none-any.whl
v0.3.2 · released 2025-10-22 · Python >=3.9 · 1 runtime deps: PyMySQL

Yes. aiomysql is a straightforward, low-friction async MySQL driver with active maintenance, no security issues, permissive licensing, and broad Python version support. Install it if you need non-blocking MySQL access in an asyncio application; the single dependency (PyMySQL) and pure-Python wheel keep setup simple.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a running MySQL server and valid connection credentials; Python 3.9 or later.
  • Low friction: pure Python wheel with a single runtime dependency (PyMySQL).
  • Actively maintained with recent commits and a stable repository; marked Alpha but in use across a broad Python version range (3.9–3.13).

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you may use, modify, and distribute aiomysql with minimal restrictions, making it suitable for both open-source and commercial projects.

last release 2025-10-22 (296 days) · last repo commit 2026-03-27 · 1,895 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 16,758,493 downloads/mo, #1,140 on PyPI

Verify before relying

import asyncio
import aiomysql

async def query():
    async with aiomysql.create_pool(host='127.0.0.1', user='root', db='mysql') as pool:
        async with pool.acquire() as conn:
            async with conn.cursor() as cur:
                await cur.execute("SELECT 42;")
                result = await cur.fetchone()
                print(result)

asyncio.run(query())
  • Whether the Alpha status (Development Status :: 3) reflects active development or stable-but-unversioned API.
  • Performance characteristics compared to other async MySQL drivers in production workloads.
  • Compatibility with MariaDB versions beyond basic keyword mention.
Same gist for agents: .md · .json

What it is and what it does

aiomysql is an async wrapper around PyMySQL that lets you execute MySQL queries without blocking your asyncio event loop. It reuses PyMySQL's connection logic and SQL parsing but replaces all blocking I/O calls with async equivalents, so you can use `await` and `async with` to manage connections, cursors, and queries. The API mirrors PyMySQL closely, making it familiar if you've used that library, and it includes optional SQLAlchemy integration ported from aiopg for ORM-style queries.

You create a connection pool with `create_pool()`, acquire connections from it, and execute queries through cursors—all with `await`. It supports both raw SQL and SQLAlchemy table operations, and works across Python 3.9 through 3.13. The package is actively maintained, has no known vulnerabilities, and carries an MIT license.

Use it for

  • Build async web services (FastAPI, aiohttp) that query MySQL without blocking the event loop.
  • Write concurrent batch jobs that fetch or insert data into MySQL from multiple coroutines.
  • Integrate MySQL with SQLAlchemy in async frameworks using the `aiomysql.sa` module.
  • Handle high-concurrency scenarios where traditional blocking drivers would exhaust thread pools.
  • Migrate from aiopg to MySQL while preserving async/await patterns and similar API structure.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

aiomysql is a straightforward, low-friction async MySQL driver with active maintenance, no security issues, permissive licensing, and broad Python version support. Install it if you need non-blocking MySQL access in an asyncio application; the single dependency (PyMySQL) and pure-Python wheel keep setup simple.

Install

aiomysql on PyPI

Before you install

Low friction: pure Python wheel with a single runtime dependency (PyMySQL). Actively maintained with recent commits and a stable repository; marked Alpha but in use across a broad Python version range (3.9–3.13).

Requires a running MySQL server and valid connection credentials; Python 3.9 or later.

License in practice

MIT license is permissive; you may use, modify, and distribute aiomysql with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

import asyncio
import aiomysql

async def query():
    async with aiomysql.create_pool(host='127.0.0.1', user='root', db='mysql') as pool:
        async with pool.acquire() as conn:
            async with conn.cursor() as cur:
                await cur.execute("SELECT 42;")
                result = await cur.fetchone()
                print(result)

asyncio.run(query())

Verify before relying

  • Whether the Alpha status (Development Status :: 3) reflects active development or stable-but-unversioned API.
  • Performance characteristics compared to other async MySQL drivers in production workloads.
  • Compatibility with MariaDB versions beyond basic keyword mention.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
PyMySQL
MaintenanceActively maintained 296 days since the last release
Last repo commit
First released
Downloads16,758,493 / month, #1,140 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaEnvironment :: Web EnvironmentFramework :: AsyncIOIntended Audience :: DevelopersOperating System :: POSIXProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: DatabaseTopic :: Database :: Front-Ends

Evidence: aiomysql-0.3.2-py3-none-any.whl

Tags

Capabilities
async mysql driverasyncio mysql clientnon-blocking mysql queriesasync database access pythonmysql with async awaitasyncio database driverasync mysql connection pool
Topics
async-iomysql-driverconnection-pooling
PyPI keywords
mysqlmariadbasyncioaiomysql

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “non-blocking mysql queries”

  • aiomysqlaiomysql provides async/await access to MySQL databases by wrapping…
  • databasesProvides async database access for PostgreSQL, MySQL, and SQLite…
  • hopsworks-aiomysqlAsync MySQL database driver for Python asyncio applications,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Database packages

psycopg2-binary Worth it
PyPI · Software Development · released Apr 2026

psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.

copyleftcompiled wheel · 3.9+
271.6Mdownloads / mo
redis Worth it
PyPI · Database · released Jul 2026

Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.

Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.

MITpure Python · 3.10+
268.3Mdownloads / mo
ydb Worth it
PyPI · Database · released Jul 2026

YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.

Install it if you need to connect Python applications to YDB databases.

permissive licensepure Python · 3.10+
210.0Mdownloads / mo
snowflake-connector-python Worth it
PyPI · Software Development · released Aug 2026

Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.

Apache-2.0compiled wheel · 3.10+
193.6Mdownloads / mo
sqlparse Worth it
PyPI · Software Development · released Aug 2026

sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.

Install it if you need to manipulate, format, or analyze SQL text programmatically.

BSD-3-Clausepure Python · 3.10+
148.9Mdownloads / mo
dbt-adapters With conditions
PyPI · Database · released Jul 2026

Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.

Apache-2.0pure Python · 3.10.0+
121.3Mdownloads / mo

See also aioodbc · aiopg · databases · hopsworks-aiomysql · asyncmy · asyncmy2 · anysqlite · aiosql · PyMySQL · mycli