clickhouse-pool
a thread-safe connection pool for ClickHouse
What it is and what it does
clickhouse-pool wraps the clickhouse-driver library to provide a thread-safe connection pool for ClickHouse databases, similar to psycopg2's pooling model. It manages a configurable minimum and maximum number of persistent connections, allowing applications to acquire and release clients without creating new connections for each query. The pool handles connection lifecycle management and cleanup.
The package is designed for Python applications that need to execute multiple queries against ClickHouse and want to avoid the overhead of establishing new connections repeatedly. It supports Python 3.9 through 3.12 and requires explicit cleanup via pool.cleanup() when the application shuts down.
Use it for:
- Web services or APIs that execute multiple ClickHouse queries per request and need connection reuse.
- Batch processing jobs that run many sequential queries and benefit from a pre-warmed connection pool.
- Multi-threaded applications where concurrent ClickHouse access requires thread-safe connection management.
- Data pipeline applications that need to balance connection overhead against resource limits.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a thread-safe connection pool for ClickHouse using clickhouse-driver, allowing applications to reuse database connections efficiently.
Yes, with conditions. The package solves a real problem—connection pooling for ClickHouse—and has low install friction. However, the aging maintenance status (no release in over a year, last commit in early 2026) means you should verify that it remains compatible with your ClickHouse server version and clickhouse-driver release before adopting it in production. The copyleft license requires that your application source be available under compatible terms if distributed.
Install
clickhouse-pool on PyPI
pip
pip install clickhouse-pooluv
uv add clickhouse-poolpoetry
poetry add clickhouse-poolInstalling clickhouse-pool
Before you install
Low install friction with a single pure-Python dependency. Maintenance status is aging—last commit was 2026-01-08 and no release in the past year, though the repository remains active and not archived.
License in practice
Licensed under LGPL-3.0-or-later (copyleft). Any application linking this package must make its own source code available under compatible terms if distributed.
Quickstart
from clickhouse_pool import ChPool
pool = ChPool(host="localhost")
with pool.get_client() as client:
result = client.execute("SELECT * FROM system.numbers LIMIT 5")
print(result)
pool.cleanup()
Requires a running ClickHouse server instance accessible at the configured host and port.
Verify before relying
- Whether the aging maintenance status (no release since 2025-08-19) indicates active development or dormancy.
- Performance characteristics and scalability limits of the pool under high concurrency.
- Compatibility with recent ClickHouse server versions and breaking changes in clickhouse-driver.
Package facts
| License | LGPL-3.0-or-later (copyleft) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — clickhouse-driver |
| Maintenance | aging — 360 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,101,283/month — #3,295 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: clickhouse_pool-0.6.1-py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
asynchasynch is an asynchronous ClickHouse driver…
permissive · top 5,000 on PyPI
connection_poolProvides a thread-safe connection pool that…
permissive · top 15,000 on PyPI
clickhouse-driverA native TCP driver for ClickHouse that…
permissive · top 5,000 on PyPI
psycopg2-poolManages a pool of reusable PostgreSQL…
copyleft · top 15,000 on PyPI
DBUtilsDBUtils provides pooled, persistent database…
permissive · top 5,000 on PyPI
pondpondPond is an object-pooling library that manages…
unclear · top 15,000 on PyPI
django-clickhouse-backendA Django database backend that lets you use…
permissive · top 15,000 on PyPI
clickhouse-sqlalchemySQLAlchemy dialect for ClickHouse that enables…
permissive · top 5,000 on PyPI
aiochclientAn async HTTP client for ClickHouse that…
permissive · top 15,000 on PyPI
adafruit-circuitpython-connectionmanagerManages sockets and connections for…
permissive · top 15,000 on PyPI