skillfed

asynch

An asyncio driver for ClickHouse with native TCP support

asynch v0.4.0 3.3M downloads/30d#2,655 on PyPI244
Permissive license Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) Active released

What it is and what it does

asynch is an asynchronous Python driver for ClickHouse that uses native TCP protocol and compiles its hot path (streams, column codecs, connection, cursors) with Cython for performance. It provides a PEP 249-compliant API with Connection, Cursor, and DictCursor classes, supporting async/await throughout, and includes a built-in connection pool and streaming result sets for efficient memory use on large queries.

The driver handles ClickHouse's native data types, supports parameterized queries, and allows both tuple and dictionary-based inserts. It includes optional transport compression via clickhouse-cityhash, can cancel long-running queries from another task, and ships type stubs for IDE support. Binary wheels are available for modern Python versions (3.11–3.13) on Linux, Windows, and macOS, with source compilation available on other platforms.

Use it for:

  • Building async web services or microservices that query ClickHouse without blocking the event loop.
  • Streaming large result sets from ClickHouse into memory-constrained environments using row-by-row iteration.
  • Bulk inserting data into ClickHouse tables from async data pipelines or ETL workflows.
  • Managing multiple concurrent ClickHouse connections via the built-in connection pool in async applications.
  • Cancelling long-running analytical queries from a separate async task when they exceed time budgets.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

asynch is an asynchronous ClickHouse driver with native TCP support, providing PEP 249-compliant Connection and Cursor interfaces for async/await-based database operations.

Yes. asynch is actively maintained, has no known vulnerabilities, and offers a well-designed async interface to ClickHouse with Cython-optimized performance. The permissive Apache 2.0 license and broad platform support via pre-built wheels make it a low-friction choice for async Python applications that need ClickHouse connectivity. Install it if you are building async code that queries or writes to ClickHouse.

Install

asynch on PyPI

pip

pip install asynch

uv

uv add asynch

poetry

poetry add asynch

Installing asynch

Before you install

Medium install friction due to compiled Cython components, but binary wheels are published for Linux (x86_64/arm64), Windows, and macOS (Intel/ARM) on Python 3.11–3.13, eliminating the need for a C toolchain on supported platforms. The package is actively maintained with recent releases.

License in practice

Licensed under Apache License 2.0, a permissive license that allows commercial use, modification, and distribution with minimal restrictions—suitable for most projects.

Quickstart

pip install asynch

from asynch import Connection

async def query():
    async with Connection(dsn="clickhouse://user:pass@127.0.0.1:9000/db") as conn:
        async with conn.cursor() as cursor:
            await cursor.execute("SELECT 1")
            result = await cursor.fetchone()
            print(result)

Requires Python 3.11 or later; ClickHouse server must be running and accessible at the specified host and port.

Verify before relying

  • Whether the Cython-compiled hot path actually matches or exceeds the performance of the synchronous C-extension driver in production workloads.
  • Support for ClickHouse 24.8+ JSON columns and whether all ClickHouse data types are fully supported.
  • Behavior and limitations of the connection pool under high concurrency or connection exhaustion scenarios.

Package facts

License Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive)
Python support supports the current Python release (<4.0,>=3.11)
Install friction medium — platform-specific wheel
Runtime dependencies 3 — ciso8601, tzdata, tzlocal
Maintenance actively maintained — 0 days since the last release
Last repo commit
First released
Downloads 3,335,625/month — #2,655 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: asynch-0.4.0-cp311-cp311-macosx_10_9_x86_64.whl; asynch-0.4.0-cp311-cp311-macosx_11_0_arm64.whl; asynch-0.4.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; asynch-0.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; asynch-0.4.0-cp311-cp311-musllinux_1_2_aarch64.whl; asynch-0.4.0-cp311-cp311-musllinux_1_2_x86_64.whl; asynch-0.4.0-cp311-cp311-win32.whl; asynch-0.4.0-cp311-cp311-win_amd64.whl; asynch-0.4.0-cp312-cp312-macosx_10_13_x86_64.whl; asynch-0.4.0-cp312-cp312-macosx_11_0_arm64.whl; asynch-0.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; asynch-0.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; asynch-0.4.0-cp312-cp312-musllinux_1_2_aarch64.whl; asynch-0.4.0-cp312-cp312-musllinux_1_2_x86_64.whl; asynch-0.4.0-cp312-cp312-win32.whl; asynch-0.4.0-cp312-cp312-win_amd64.whl; asynch-0.4.0-cp313-cp313-macosx_10_13_x86_64.whl; asynch-0.4.0-cp313-cp313-macosx_11_0_arm64.whl; asynch-0.4.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; asynch-0.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Keywords: asyncio, clickhouse, python, driver

Development Status :: 4 - BetaFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: DatabaseTopic :: Software Development :: Libraries :: Python Modules

Tags

async clickhouse driverclickhouse python asynciopep 249 async databaseclickhouse tcp clientasync database connection poolclickhouse streaming resultsasyncio database driver
asyncioclickhousetcp-driver

More Python Modules packages