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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for clickhouse_pool-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2ea9fa81b657fb85f9cb2ff97e9d9f1c8eab845cb8978ad71f5fd6d25711cd6 |
|
MD5 | 89052dffdd18ef7c3ac80013a0f7aa9f |
|
BLAKE2b-256 | 175d59190a35b43ba2b3bb69b68c588cf6a07eb332973934a3394c0ea9a265fb |