finds.dev← search

// the find

mymarilyn/clickhouse-driver

★ 1,300 · Python · NOASSERTION · updated Jul 2026

ClickHouse Python Driver with native interface support

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.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →