Sandil Ranasinghe
Sandil Ranasinghe

Reputation: 787

Does `clickhouse_connect.get_client` return a new client instance every time?

As the question mentions, does clickhouse_connect.get_client in the python client return a new client instance every time it is called? I can't seem to find if it is explicitly mentioned as such in the documentation, but it seems implied. I'm a little confused because of the name get_client (instead of say create_client).

Upvotes: 2

Views: 43

Answers (1)

Lajos Arpad
Lajos Arpad

Reputation: 76943

Yes. You can find this in init.py

from clickhouse_connect.driver import create_client, create_async_client

driver_name = 'clickhousedb'

get_client = create_client
get_async_client = create_async_client

Permalink to the line of importance.

Upvotes: 2

Related Questions