blob: 4a2a24755958970fc2d6c5cfb4448defb3a96fab (
plain)
1
2
3
4
5
6
7
8
9
10
|
from clickhouse_driver import Client as ClickhouseClient
_links = {}
def get_clickhouse(db: str) -> ClickhouseClient:
if db not in _links:
_links[db] = ClickhouseClient.from_url(f'clickhouse://localhost/{db}')
return _links[db]
|