Skip to content

tomoncle/clickhouse-http-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clickhouse-http-client

clickhouse http client.

Install

  • Use source:
$ git clone https://github.com/tomoncle/clickhouse-http-client.git
$ cd clickhouse-http-client
$ sudo python setup.py install
  • Use pip:
$ pip install clickhouse-http-client

Usage

  • query
from clickhouse_http_client import ClickHouse

ck = ClickHouse(password="123456")

ck.text("select * from table_name")
ck.json("select * from table_name")
  • delete
from clickhouse_http_client import ClickHouse

ck = ClickHouse(password="123456")
ck.delete("table_name", "id IS NOT NULL")
  • save
from clickhouse_http_client import ClickHouse

ck = ClickHouse(password="123456")
ck.insert("table_name", {"name":"tomoncle", "age":"27"})
  • update
from clickhouse_http_client import ClickHouse

ck = ClickHouse(password="123456", show_sql=True)