aiochclient
Async http clickhouse client for python 3.10+
What it is and what it does
aiochclient is an async HTTP client for ClickHouse that bridges Python and ClickHouse type systems automatically. It works with either aiohttp or httpx as the underlying HTTP connector and provides methods for executing queries, fetching results all at once, fetching single rows, and streaming results via async iteration. Rows are returned as lightweight objects supporting both index and name-based field access.
The package targets Python 3.10+ and emphasizes performance through optional compiled speedups and Cython compilation. It handles complex ClickHouse types—tuples, arrays, nullable types, decimals, IP addresses, UUIDs, and nested structures—converting them transparently to Python equivalents. The single runtime dependency is sqlparse.
Use it for:
- Fetch large result sets from ClickHouse without loading all rows into memory at once using async iteration.
- Insert bulk data into ClickHouse with automatic type conversion from Python objects.
- Build async applications that query ClickHouse alongside other I/O-bound operations without blocking.
- Work with complex ClickHouse types (tuples, arrays, decimals, UUIDs) and have them automatically converted to Python types.
- Monitor ClickHouse connectivity and health checks in async services using the is_alive() method.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
An async HTTP client for ClickHouse that handles type conversion between ClickHouse and Python types, supports streaming and lazy decoding on SELECT queries, and provides a fully typed interface.
Yes, with conditions. Install if you need an async ClickHouse client for Python 3.10+ and are willing to choose and install an HTTP connector. The package is actively maintained, has no known vulnerabilities, and offers good type safety. High install friction and the requirement to select a connector are the main trade-offs; evaluate whether the async model and type conversion features justify the setup overhead for your use case.
Install
aiochclient on PyPI
pip
pip install aiochclientuv
uv add aiochclientpoetry
poetry add aiochclientInstalling aiochclient
Before you install
High install friction: requires Python 3.10+ and a choice of HTTP connector (aiohttp or httpx), with optional compiled speedups and Cython compilation available. Maintenance is active with recent releases and steady repository activity.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install aiochclient[aiohttp]
from aiochclient import ChClient
async def main():
client = ChClient(session)
await client.execute("CREATE TABLE t (a UInt8) ENGINE = Memory")
await client.execute("INSERT INTO t VALUES", (1,))
rows = await client.fetch("SELECT * FROM t")
Requires Python 3.10 or later and either aiohttp or httpx installed as a peer dependency.
Verify before relying
- Whether the stated benchmarks (180k-220k rows/sec SELECT, 50k-80k rows/sec INSERT) remain accurate for current version 2.7.0.
- Whether Cython compilation is automatic or requires manual setup during installation.
- Whether sqlparse is used at runtime or only as a build/test dependency.
- How the optional speedups (cChardet, aiodns, ciso8601) affect installation and performance.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | high — source build required |
| Runtime dependencies | 1 — sqlparse |
| Maintenance | actively maintained — 71 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 102,243/month — #12,882 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aiochclient-2.7.0.tar.gz
Keywords: clickhouse, async, python, aiohttp, httpx
Tags
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object…
permissive · top 100 on PyPI
psycopg2-binarypsycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
alembicAlembic generates and manages database schema…
permissive · top 1,000 on PyPI
weaviate-clientA Python client library for connecting to and…
permissive · top 1,000 on PyPI
databricks-sql-connectorA Python client library that connects to…
permissive · top 1,000 on PyPI
psycopgPsycopg 3 is a PostgreSQL database adapter for…
copyleft · top 1,000 on PyPI
clickhouse-driverA native TCP driver for ClickHouse that…
permissive · top 5,000 on PyPI
asynchasynch is an asynchronous ClickHouse driver…
permissive · top 5,000 on PyPI
infi.clickhouse-ormAn ORM for ClickHouse that lets you define…
permissive · top 15,000 on PyPI
clickhouse-poolProvides a thread-safe connection pool for…
copyleft · top 5,000 on PyPI
clickhouse-connectA Python database driver for ClickHouse that…
permissive · top 1,000 on PyPI
airflow-clickhouse-pluginProvides Apache Airflow operators and hooks to…
permissive · top 15,000 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
aiohttp-asgi-connectorProvides an AIOHTTP connector that lets you…
permissive · top 15,000 on PyPI
mcp-clickhouseAn MCP server that exposes ClickHouse database…
permissive · top 15,000 on PyPI
chdbchDB is an in-process SQL OLAP engine powered…
permissive · top 5,000 on PyPI