Async HTTP ClickHouse client for Python 3.6+. Provides both high-level and low-level interfaces for querying ClickHouse databases over HTTP. Current version 2.6.0, maintained.
pip install aiochclientVerified import paths — ran on the pinned version, not inferred.
Basic usage: create session, execute query, iterate rows.
Install with the desired extra, e.g., pip install aiochclient[aiohttp].
Remove 'user' and 'password' from the URL query; set 'X-ClickHouse-User' and 'X-ClickHouse-Key' headers instead.
Use pip install aiochclient[charset_normalizer] if you need charset detection, or remove cchardet from your dependencies.
Use aiohttp client for automatic string decoding, or decode bytes manually.
pip install aiochclient[aiohttp]
Set 'X-ClickHouse-User' and 'X-ClickHouse-Key' (or 'X-ClickHouse-Password') headers on the ClientSession.
from aiochclient import ChClient
Use client as a plain object; only query methods like execute() are awaitable.