--- id: asyncmy2 version: "0.2.21" license: Apache-2.0 license_treatment: permissive maintenance: active --- # asyncmy2 — A fast asyncio MySQL driver License: permissive · Maintenance: active · Downloads: 328.5K/mo ## What it is and what it does asyncmy2 is an async MySQL/MariaDB driver designed for Python 3.10+ that combines the API of aiomysql with a Cython-rewritten protocol layer for faster execution. It supports both simple connections and connection pooling, and includes MySQL replication protocol support for streaming binary log events asynchronously. The package is a community-maintained fork built on top of pymysql and aiomysql, reusing their design while accelerating the core protocol handling. It has been tested against both MySQL and MariaDB. No runtime dependencies are required beyond Python itself, though installation requires a C++ compiler (pre-installed on Linux/macOS, must be manually set up on Windows). Use it for: - Building async web services that need concurrent MySQL queries without blocking I/O - Streaming MySQL replication events in real-time for data synchronization or analytics pipelines - Replacing aiomysql when performance is critical and Cython compilation overhead is acceptable - Connection pooling for high-concurrency applications handling many simultaneous database clients - Migrating from synchronous pymysql to async code while keeping familiar API patterns ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. asyncmy2 is a fast asyncio-based MySQL/MariaDB driver that rewrites the core protocol in Cython for performance while maintaining API compatibility with aiomysql. Yes, if you need async MySQL access and are willing to handle Cython compilation. The package is actively maintained, has no known vulnerabilities, and offers API compatibility with aiomysql while claiming performance gains. Install friction is moderate (compilation required, especially on Windows). Not recommended if you need Python versions below 3.10 or want to avoid build toolchain setup. ## Install pip install asyncmy2 uv add asyncmy2 poetry add asyncmy2 ## Installing asyncmy2 Before you install: Medium install friction due to Cython compilation requirements. On Windows, Microsoft C++ Build Tools must be pre-installed. The package is actively maintained with a recent release and no known vulnerabilities. License in practice: Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions beyond attribution. Quickstart: import asyncio from asyncmy import connect async def main(): conn = await connect(user='root', password='') async with conn.cursor() as cursor: await cursor.execute('SELECT 1') result = await cursor.fetchone() await conn.ensure_closed() asyncio.run(main()) Requires Python 3.10+. On Windows, Microsoft C++ Build Tools must be installed before package installation. On macOS/Linux, standard build tools are needed. Verify before relying: - Whether the Cython performance gains justify the compilation overhead for typical workloads - Compatibility scope with aiomysql—which specific API surface is covered - Production readiness given the project's recent creation (first release 2025-10-11) ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 328.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags async mysql driver, asyncio mysql client, fast mysql asyncio, mariadb async driver, mysql replication asyncio, cython mysql driver, aiomysql compatible, async-database, mysql-driver, cython-accelerated [View on SkillFed](https://skillfed.io/packages/asyncmy2) · [View on PyPI](https://pypi.org/project/asyncmy2/)