finds.dev

mymarilyn/clickhouse-driver

ClickHouse Python Driver with native interface support

View on GitHubHomepage ↗

★ 1,300PythonNOASSERTIONupdated Jul 2026

// the take

A native TCP-protocol Python driver for ClickHouse, as opposed to the HTTP-based clickhouse-connect. Uses Cython extensions for the hot paths (buffered I/O, varint encoding, large int handling), which makes it meaningfully faster than a pure-Python implementation. The target is anyone running ClickHouse at scale who needs block streaming, NumPy integration, or fine-grained query settings.

The native protocol support is the core differentiator — you get real block-by-block streaming and query progress events that the HTTP interface doesn't expose. Cython-compiled extensions for buffered reader/writer and varint are a legitimate performance choice, not premature optimization. Type coverage is thorough: Map, Nested, LowCardinality, Int256, DateTime64 with timezone, IPv4/IPv6 — the kinds of types that break other drivers. The DB API 2.0 layer means drop-in compatibility with tools that expect PEP 249 cursors.

The async story is a separate repo (aioch) that appears largely unmaintained — not a great answer for anyone building on asyncio in 2026. The native protocol is a double-edged sword: ClickHouse has changed it between versions and the driver has historically lagged, which is why there's an entire docs page titled 'Unsupported Server Versions'. No connection pooling built in; you have to manage that yourself or wrap it. The official ClickHouse-maintained driver (clickhouse-connect) now has first-party support from Yandex/ClickHouse Inc., which shifts the long-term maintenance bet away from this community project.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,300
Forks
234
Language
Python
License
NOASSERTION
Last commit
9 Jul 2026

// nearby

If clickhouse-driver isn't quite it.

All repos →