NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #639 most downloaded on PyPI
ClickHouse Database Core Driver for Python, Pandas, and Superset
Last release 11 days ago
22 Sep 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
3 versions withdrawn
withdrawn after publishing
4 years old
147 releases · first in 2022
One column per quarter.
Added the AsyncClient wrapper which is intended for asyncio environment usage. AsyncClient has the same methods with the same parameters as the standa
AsyncClient wrapper which is intended for asyncio environment usage. AsyncClient has the same methods with the same parameters as the standard Client, but they are coroutines when applicable. Internally, these methods from the Client that perform I/O operations are wrapped in a run_in_executor call.
See also the updated run_async example.Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.7.15...v0.7.16
Allow using client cert and key with mutual TLS proxy by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/373
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.7.14...v0.7.15
verify parameter to proxy. This should close https://github.com/ClickHouse/clickhouse-connect/issues/370Add an example of how to run async by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/359
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.7.12...v0.7.14
Set required minimum version for optional tzlocal dependency. Thanks to drew-talon for reporting the issue and submitting the fix. Closes #360.
show_clickhouse_errors client setting to exclude showing hostname and port for errors
when that setting is False. Thanks to Andy for the PR!$my_tag$, in the query, and add that tag and the associated data into the query method parameters argument.
For some examples, see the test_embedded_binary test in test_client.py.
Closes #363.Fix FixedString pandas type by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/357
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.7.11...v0.7.122
query_df with a FixedString column with a read format of 'string' (and the default query_df setting
use_extended_dtypes=True), the resulting column in the dataframe will now be correctly set to the (extended) String dtype.
Fixes https://github.com/ClickHouse/clickhouse-connect/issues/356Fix precision loss in Float to Decimal conversion by @feychenie in https://github.com/ClickHouse/clickhouse-connect/pull/354
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.7.10...v0.7.11
Attempt fix of a pandas concatenation exception for some kinds of empty responses.
Attempt fix of a pandas concatenation exception for some kinds of empty responses.
added missing parameter to tzname by @tstenson in https://github.com/ClickHouse/clickhouse-connect/pull/341
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.7.8...v0.7.9
show_clickhouse_errors controls whether the full ClickHouse error (including possibly
sensitive information) is displayed when there is an error in ClickHouse processing. It defaults to True. If False,
the simple string 'The ClickHouse server returned an error.' will be displayed. Closes https://github.com/ClickHouse/clickhouse-connect/issues/344.Client timezone update by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/339
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.7.7...v0.7.8
apply_server_timezone get_client parameter is explicitly set to False. The previous behavior
could cause confusing results where datetime values would be rendered in a Daylight Savings Time/Summer Time zone when
DST was not active, and vice versa.Fix complex numeric query binds, clean up raw API by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/336
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.7.6...v0.7.7
raw_stream method to the Client the returns an io.Base. Use this instead of the raw_query method
with the (now removed) optional stream keyword boolean. Thanks to Martijn Thé for
the PR that highlighted the somewhat messy public API.Fix sqlalchemy Point by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/333
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.7.5...v0.7.6
Add async_insert=0 for tests by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/323
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.7.4...v0.7.5
%d (int) and %f (float) format patterns. Closes
https://github.com/ClickHouse/clickhouse-connect/issues/327data argument in the initializer of ExternalFile / ExternalData objects. Thanks to
martijnthe for the PR!Skip json tests by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/319
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.7.3...v0.7.4
query_arrow_stream for streaming PyArrow queries from ClickHouse. Big thanks to
NotSimone for the feature and tests! Closes https://github.com/ClickHouse/clickhouse-connect/issues/155.Add summary field to the Cursor object by @elchyn-cheliabiyeu in https://github.com/ClickHouse/clickhouse-connect/pull/317
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.7.2...v0.7.3
Improve query_df, update pylint by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/311
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.7.1...v0.7.2
query_df method should be constructed somewhat faster in cases where the data returned in ClickHouse
is in many small blocks. Note that performance gains in this use case are somewhat limited because of the memory and copying cost of
building a large DataFrame from many smaller ClickHouse Native block structures, so such performance problems should normally be addressed at the
query or ClickHouse data storage level (by for example, reducing the number of partitions and/or shards referenced by the query). This may partially
address https://github.com/ClickHouse/clickhouse-connect/issues/307.Correct typing of Client.query*(query) by @biggerfisch in https://github.com/ClickHouse/clickhouse-connect/pull/301
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.7.0...v0.7.1
query parameter in Client query* methods to Optional[str] to work correctly with type analyzers.
This also highlights that using a query_context instead of a query in these methods is supported (and preferred for repeated queries).
Thanks to Avery Fischer for the PR!insert_file tools function. Closes https://github.com/ClickHouse/clickhouse-connect/issues/305Drop Python 3.7 builds, minor updates
Drop Python 3.7 builds, minor updates
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.6.23...v0.7.0
params and valid_transport_settings before calling get_client so that such "special" query parameters will be
included even on initialization queries. Thanks to Aleksey Astafiev for highlighting
the problem and contributing a PR.connect_timeout and send_receive_timeout by
setting them to none. The same PR from Aleksey Astafiev now allows setting to values to NoneAdd missing Nothing datatype for SQLAlchemy by @elchyn-cheliabiyeu in https://github.com/ClickHouse/clickhouse-connect/pull/279
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.6.22...v0.6.23
query_df due to Pandas future warning. Thanks to Dylan Modesitt
for the PR!fix the small logging message typo by @reijnnn in https://github.com/ClickHouse/clickhouse-connect/pull/275
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.6.21...v0.6.22
ATTACH queries were not be correctly processed as "commands". Thanks to Aleksei Palshin
for the PR!add point type by @Dhruvit96 in https://github.com/ClickHouse/clickhouse-connect/pull/273
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.6.20...v0.6.21
Fix datetime parameter binding with timezones by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/269
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.6.19...v0.6.20
Release 0 6 19 by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/266
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.6.18...v0.6.19
None value into a non-Nullable String column. As this could mask
invalid input data, any attempt to insert None into a non-Nullable String or LowCardinality(String) will now throw
a DataErrorThis reduces the block size for chunked inserts to avoid timeouts over HTTPS
This reduces the block size for chunked inserts to avoid timeouts over HTTPS
send_receive_timeout value is specified.
Closes https://github.com/ClickHouse/clickhouse-connect/issues/259. Note that a very short send_receive_timeout is not recommended.Release 0 6 17 by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/255
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.6.16...v0.6.17
Fixes an import problem on some Python installations, including RHEL
Fixes an import problem on some Python installations, including RHEL
Build and CI tests for Python 3.12
Build and CI tests for Python 3.12
clickhouse-connect.get_client method now displays type hints and ignores non-keyword arguments. Thanks to
Avery Fischer for the usability improvement!Fix Python 3.7 import issue, 0 length FixedString Inserts
Fix Python 3.7 import issue, 0 length FixedString Inserts
Add py.typed file (PEP 561) by @biggerfisch in https://github.com/ClickHouse/clickhouse-connect/pull/243
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.6.12...v0.6.13
py.typed file. Thanks to Avery Fischer
for the contribution.Fixes index error on nested empty maps using native protocol
Fixes index error on nested empty maps using native protocol
Release 0 6 11 by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/235
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.6.10...v0.6.11
Allow use of the Object(Nullable('json')) type, which is sometimes generated as a result of schema inference.
Allow use of the Object(Nullable('json')) type, which is sometimes generated as a result of schema inference.
Object(Nullable('json')) type, which is sometimes detected by schema inference.Improved insert error diagnostics, small packaging improvements.
Improved insert error diagnostics, small packaging improvements.
VERSION to a Python __version__ file in the package. This removes the Python 3.7 dependency
on importlib_metadata..pyx, and .pxd files are now included in the PyPI source distribution to improve compatibility with 3rd party build tools.Insert compression issues by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/224
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.6.7...v0.6.8
raw_insert method when a compression method specified. https://github.com/ClickHouse/clickhouse-connect/issues/223tools.insert_file method. '.gz' and '.gzip' extensions are automatically
recognized.Fixes an issue with reading some LowCardinality columns. Updates Cython to 3.0.0
Fixes an issue with reading some LowCardinality columns. Updates Cython to 3.0.0
compression alias for the compress client setting in SQLAlchemy/Superset DSN urls.Fix Pandas integer enum insert by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/220
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.6.5...v0.6.6
Adds QuerySummary to insert queries, fixes several small issues
Adds QuerySummary to insert queries, fixes several small issues
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.6.4...v0.6.5
driver.tools module, since these rely on an unmodified buffered input stream to efficiently upload files.
In that case the actual insert query will still be passed as a query parameter.common.max_error_size setting. Use 0 for this setting to get the full ClickHouse
error message. In addition, the default has been changed to 1024 to capture more SQL errors without needing to
modify the global setting value. Thanks to Ramlah Aziz for the update!written_rows,
written_bytes, and query_id calculated from ClickHouse HTTP response headers. A QuerySummary object is also
returned from the Client command method if the command does not return other data. Closes https://github.com/ClickHouse/clickhouse-connect/issues/216pkg_resources package. This also
avoids some indirect dependency problems. Thanks to cwegener for the PR!Fix issue when ClickHouse has no defaultdatabase
defaultdatabaseget_table_names method when database contains special charactersFull Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.6.3...v0.6.4
Fix float rounding for Decimal columns, and broken datetime64 dates before 1970
Fix float rounding for Decimal columns, and broken datetime64 dates before 1970
fix _MAXHEADERS property by @istrebitel-1 in https://github.com/ClickHouse/clickhouse-connect/pull/197
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.6.1...v0.6.2
Minor documentation clean up regarding Superset compatibility
Minor documentation clean up regarding Superset compatibility
Superset engine spec removed, multiprocessing fix with uuid4 session ids and urllib3 PoolManager per client, low level insert improvements.
Superset engine spec removed, multiprocessing fix with uuid4 session ids and urllib3 PoolManager per client, low level insert improvements.
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.25...v0.6.0
forked multiprocessing environment.Fixes an issue with using clickhouse-connect with CHProxy and recent ClickHouse versions related to the client_protocol_version setting
Fixes an issue with using clickhouse-connect with CHProxy and recent ClickHouse versions related to the client_protocol_version setting
client_protocol_version query parameter is actually received and used by the ClickHouse
server before assuming that data returned confirms to the expected protocol version. This fixes an incompatibility with the
current versions of CHProxy (and possibly other proxies that restrict the query parameters passed to the ClickHouse Server).
Note that other features that require the use of query parameters (such as server side bound query parameters) may also fail
because of this behavior in CHProxy. Fixes https://github.com/ClickHouse/clickhouse-connect/issues/191Fixes bugs with external data, SimpleAggregateFunction inserts, and date/datetime server side parameter binding.
Fixes bugs with external data, SimpleAggregateFunction inserts, and date/datetime server side parameter binding.
command method now accepts ClickHouse "external data." Closes https://github.com/ClickHouse/clickhouse-connect/issues/186Some minor bug fixes, plus a new common setting max_connection_age
Some minor bug fixes, plus a new common setting max_connection_age
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/0.5.22...v0.5.23
SimpleAggregateFunction columns. This has been fixed.
https://github.com/ClickHouse/clickhouse-connect/issues/180SimpleAggregateFunction columns with a LowCardinality type parameter was broken. This has been fixed.
https://github.com/ClickHouse/clickhouse-connect/issues/182query_arrow method now correctly accepts the external_data parameter. https://github.com/ClickHouse/clickhouse-connect/issues/183query_arrow method has been fixed for read only queries/settings. https://github.com/ClickHouse/clickhouse-connect/issues/184max_connection_age has been added, which will ensure that HTTP connections are not reused forever (this
can help with certain load balancing issues. It defaults to 10 minuteszstd compression was broken with urllib3 (both the library and clickhouse-connect were decompressing the payload)
zstd compression was broken with urllib3 (both the library and clickhouse-connect were decompressing the payload)
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.21...0.5.22
nit: change unexpected http error log to warning level by @alexandrosandre in https://github.com/ClickHouse/clickhouse-connect/pull/173
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.20...v0.5.21
wait_end_of_query setting is no longer automatically sent with inserts. This caused unnecessary buffering on the ClickHouse server file system, especially
in the case of many small inserts. It can still be added using the settings dictionary of the client *insert methods if needed for some reason.use_na_values has been renamed to use_extended_dtypes and now applies to all extended/special Pandas dtypes (except the Pandas Timestamp type).
Set this to False to limit the dtypes returned in Pandas dataframes to the "basic" numpy types. (Note that this will force the use of numpy object arrays
for most "nullable types") This should allow creating "basic" dataframes for greater compatibility. Closes https://github.com/ClickHouse/clickhouse-connect/issues/172.Fix http settings and row dataframe inserts by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/168
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.19...v0.5.20
Fixes #159 - quoting and escaping string literals inside lists by @ewjoachim in https://github.com/ClickHouse/clickhouse-connect/pull/161
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.18...v0.5.19
no_proxy/NO_PROXY environment variable. Also added support for lower case http_proxy and https_proxy variables. Note that
lower case versions have precedence over upper case versions. Fixes https://github.com/ClickHouse/clickhouse-connect/issues/163Same timezone fix by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/158
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.17...v0.5.18
get_client apply_server_timezone parameter is True (the default). This improves performance where client and server
have the same (non-UTC) timezone. To override this behavior and always apply a server timezone to the result, use apply_server_timezone='always'.
This should fix https://github.com/ClickHouse/clickhouse-connect/issues/157Timezone updates and external data by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/156
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.16...v0.5.17
query_df and query_df_stream methods now accept query_tz and column_tzs parameters like other
query* methods.apply_server_timezone has been added to the main get_client method. Setting this
parameter to True (the default) will apply the server timezone (if not UTC) to values returned by the client query*
methods. The previous behavior would always return timezone naive, UTC based Python and Pandas datetime objects for
ClickHouse DateTime and DateTime64 columns without a defined timezone. To revert to the previous behavior, set the
apply_server_timezone parameter to False. Closes https://github.com/ClickHouse/clickhouse-connect/issues/152column_tzs parameterquery_tz parameterX-ClickHouse-Timezone header if different from the server timezone. This closes https://github.com/ClickHouse/clickhouse-connect/issues/138.apply_server_timezone is True)clickhouse-connect will always return a naive datetime object with no timezone informationquery methods. To send external data, construct a driver.external.ExternalData object and
send it as the external_data parameter in the appropriate query method. See the ClickHouse documentation
for additional details. There are also examples in the test file .
Closes https://github.com/ClickHouse/clickhouse-connect/issues/98fix key error in connection with no available settings from server by @Barsoomx in https://github.com/ClickHouse/clickhouse-connect/pull/147
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.15...v0.5.16
system.settings table. Thanks
to Filipp Balakin for the fix.str). A corresponding bytes
read format has been enabled for String columns as well. Thanks to Tim Nooran for opening
the issue and providing unit tests. https://github.com/ClickHouse/clickhouse-connect/issues/148Allows connect to server version 19.16.19.85 by @aastafiev in https://github.com/ClickHouse/clickhouse-connect/pull/140
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.14...v0.5.15
readonly
clickhouse_connect.common setting to '1' to allow sending ClickHouse settings with individual queries (if the user has
write permissions). Thanks to Aleksey Astafiev for this contribution and for
updating the tests to run with these legacy versions!Fixed bad pandas import, made optional import failure message less noisy.
Fixed bad pandas import, made optional import failure message less noisy.
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.13...v0.5.14
Panda nulls by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/137
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.12...v0.5.13
use_pandas_na to True. When use_pandas_na is True, clickhouse_connect will attempt to use Pandas "missing"
values, such as pandas.NaT and pandas.NA, for ClickHouse NULLs (in Nullable columns only), and use the associated
extended Pandas dtype. Closes https://github.com/ClickHouse/clickhouse-connect/issues/132use_none was set
to False. All NULL values are now properly converted.Server host name by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/134
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.11...v0.5.12
server_host_name is now recognized by the clickhouse_connect.get_client method. This identifies
the "real" ClickHouse server hostname that should be used for HTTPS/TLS certificate validation, in cases where access to
the server is through an ssh tunnel or other proxy with a different hostname. For examples of how to use the new parameter,
see the updated file https://github.com/ClickHouse/clickhouse-connect/blob/main/examples/ssh_tunnels.py.database element of a DSN was not recognized when present in the dsn parameter of clickhouse_connect.get_client.
This has been fixed.Better error message for invalid numpy DateTime64 types by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/127
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.10...v0.5.11
named_results property after other properties such as row_count would incorrectly
raise a StreamClosedError. Thanks to Stas for the fix.datetime64[s], datetime64[ms], datetime64[us], and datetime64[ns]). A workaround is to cast the DateTime64 type
to a supported type, i.e. SELECT toDateTime64(col_name, 3) for a millisecond column.clickhouse_connect.driver.http_util.get_pool_manager_options. This makes it simpler to configure a SOCKSProxyManager
as in the new example file https://github.com/ClickHouse/clickhouse-connect/blob/main/examples/ssh_tunnels.pyOptimize null strings, bug fixes by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/125
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.9...v0.5.10
use_none=False query parameter would not be respected,
and ClickHouse NULLS would be returned as None instead of 0. use_none=False should now work correctly for
Nullable(Int) columnsStreaming fixes by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/124
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.8...v0.5.9
zstd compression incorrectly buffered all incoming data at the start of the query,
consuming an excessive amount of memory. This has been fixed. https://github.com/ClickHouse/clickhouse-connect/issues/122
Big thanks to Denny Crane for his detailed investigation of the problem. Note that
this affected large queries using the default compress=True client setting, as ClickHouse would prefer zstd compression
in those cases.system.settings
table. https://github.com/ClickHouse/clickhouse-connect/issues/123Return empty df instead of list by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/119
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.7...v0.5.8
query_df method Fixes
https://github.com/ClickHouse/clickhouse-connect/issues/118query_limit now defaults to 0 (unlimited rows returned), since the previous default of 5000 was unintuitive
and led to confusion when limited results were returned.query methods for native
Python results now accept two new parameters: query_tz is the timezone to be assigned for any DateTime or DateTime64
objects in the results, while timezones can be set per column using the column_tzs dictionary of column names to
timezones. See the test file
for simple examples. This is a workaround for https://github.com/ClickHouse/clickhouse-connect/issues/120 and the
underlying ClickHouse issue https://github.com/ClickHouse/ClickHouse/issues/40397 Note that this issue only affects DateTime
columns, not DateTime64, although the query context parameters will override the returned DateTime64 timezone as well.Restore proxy support by @genzgd in https://github.com/ClickHouse/clickhouse-connect/pull/115
Full Changelog: https://github.com/ClickHouse/clickhouse-connect/compare/v0.5.6...v0.5.7
pool_mgr argument to teh clickhouse_connect.create_client method.Your coding agent can read these notes before it upgrades. Set up the MCP server →