Skip to main content

A thread-safe connection pool for ClickHouse.

Project description

ClickHouse Pool for Python

A thread-safe connection pool for ClickHouse. Inspired by psycopg2 and using clickhouse-driver for connections.


pip install clickhouse-pool

Quick Start

from clickhouse_pool.pool import ChPool

# create a pool
pool = ChPool(host='localhost')

# get a conn (clickhouse-driver client)
conn = pool.get_conn()

# execute sql and print the result
result = conn.execute("SELECT * FROM system.numbers LIMIT 5")

# always put the connection back in the pool once you're done

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clickhouse-pool-0.1.1.tar.gz (3.0 kB view hashes)

Uploaded source

Built Distribution

clickhouse_pool-0.1.1-py3-none-any.whl (5.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page