skillfed

clickhouse-pool

a thread-safe connection pool for ClickHouse

clickhouse-pool v0.6.1 2.1M downloads/30d#3,295 on PyPI42
Copyleft license LGPL-3.0-or-later AGING released

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-pool

uv

uv add clickhouse-pool

poetry

poetry add clickhouse-pool

Installing 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

License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9

Tags

clickhouse connection poolthread-safe database poolingclickhouse client poolingconnection reuse clickhouseclickhouse driver wrapperdatabase connection managementclickhouse pool python
connection-poolingclickhousethread-safe

More Database packages