Python driver with native interface for ClickHouse
Project description
ClickHouse Python Driver
ClickHouse Python Driver with native (TCP) interface support.
Usage example:
from clickhouse_driver.client import Client client = Client('localhost') client.execute('SHOW TABLES') client.execute('DROP TABLE IF EXISTS test') client.execute('CREATE TABLE test (x Int32) ENGINE = Memory') client.execute( 'INSERT INTO test (x) VALUES', [{'x': 1}, {'x': 2}, {'x': 3}, {'x': 100}] ) client.execute('INSERT INTO test (x) VALUES', [[200]]) print(client.execute('SELECT sum(x) FROM test'))
Connection Parameters
The first parameter host is required. There are some optional parameters:
port is port ClickHouse server is bound to. Default is 9000.
database is database connect to. Default is default.
user. Default is default.
password. Default is ‘’ (no password).
client_name. This name will appear in server logs. Default is pyclient.
You can also specify timeouts via:
connect_timeout. Default is 10 seconds.
send_receive_timeout. Default is 300 seconds.
sync_request_timeout. Default is 5 seconds.
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
File details
Details for the file clickhouse-driver-0.0.2.tar.gz.
File metadata
- Download URL: clickhouse-driver-0.0.2.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d555d2567cac38138dcd3c282060d1bbd551a562ce38f6c307014646686bba5
|
|
| MD5 |
329d93df2e5541f8a881c23cd422c4ce
|
|
| BLAKE2b-256 |
a97ce357eba9e189adb7f732c105e7f5ad447b8d9a35f30691798265d98bc22c
|