--- id: asynch version: "0.4.0" 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) license_treatment: permissive maintenance: active --- # asynch — An asyncio driver for ClickHouse with native TCP support License: permissive · Maintenance: active · Downloads: 3.3M/mo ## 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 above — 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 pip install asynch uv add asynch 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_current - Install friction: medium - Maintenance: active - Downloads: 3.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags async clickhouse driver, clickhouse python asyncio, pep 249 async database, clickhouse tcp client, async database connection pool, clickhouse streaming results, asyncio database driver, asyncio, clickhouse, tcp-driver [View on SkillFed](https://skillfed.io/packages/asynch) · [View on PyPI](https://pypi.org/project/asynch/)