clickhouse-bundle

Clickhouse support for applauncher


Keywords
applauncher, clickhouse
License
Apache-2.0
Install
pip install clickhouse-bundle==1.0

Documentation

Clickhouse Bundle

Just a clickhouse client provider for applauncher

Installation

pip install clickhouse_bundle  

Then add to your main.py

import clickhouse_bundle

bundle_list = [
    clickhouse_bundle.ClickhouseBundle(),
]

Configuration

Currently just the connection uri, for example

clickhouse:
  connection_uri: 'clickhouse://localhost:9000/default'

Usage

Just inject and use it as a regular clichouse client

import inject
from clickhouse_driver import Client

client = inject.instance(Client)
query = f"SELECT name FROM fruits limit %(limit)s"
params = {
    "limit": 10
}

result = client.execute(query, params)

More information about clickhouse sql syntax here https://clickhouse.tech/docs/es/sql-reference/syntax/