Skip to main content

A small example package

Project description

ClickHouse Pool for Python

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

Installation

pip install clickhouse-pool

Quick Start

from clickhouse-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")
print(result)

# always put the connection back in the pool once you're done
pool.put_conn(conn=conn)

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.0.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

clickhouse_pool-0.1.0-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page