ClickHouse/clickhouse-connect là dự án Backend trên GitHub, viết chủ yếu bằng Python, với 532 sao. Python driver/sqlalchemy/superset connectors
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
ClickHouse Connect works with both ClickHouse Cloud and self-hosted ClickHouse. You can start a free Cloud trial or install ClickHouse locally.
For local development, you can also start ClickHouse with the included Docker Compose configuration.
ClickHouse Connect uses the ClickHouse HTTP interface for maximum compatibility. An experimental
chDB backend is also available for running queries against an embedded
in-process engine with get_client(interface='chdb'). Install it with pip install clickhouse-connect[chdb].
Installation
pip install clickhouse-connect
ClickHouse Connect requires Python 3.10 or higher.
Upgrading from 0.x
The 1.0 release includes breaking changes. If you are upgrading from a 0.15.x or earlier release, see MIGRATION.md for a guide to the changes and their replacements.
Releases
clickhouse-connect and the optional clickhouse-connect-core Rust binding are versioned independently.
The badges above show their latest published PyPI versions.
GitHub Releases track clickhouse-connect.
See the driver changelog and the core binding changelog for release notes.
Superset Connectivity
ClickHouse Connect is fully integrated with Apache Superset. Previous versions of ClickHouse Connect utilized a
dynamically loaded Superset Engine Spec, but as of Superset v2.1.0 the engine spec was incorporated into the main
Apache Superset project and removed from clickhouse-connect in v0.6.0. If you have issues connecting to earlier
versions of Superset, please use clickhouse-connect v0.5.25.
When creating a Superset Data Source, either use the provided connection dialog, or a SqlAlchemy DSN in the form
clickhousedb://{username}:{password}@{host}:{port}.
SQLAlchemy Implementation
ClickHouse Connect includes a lightweight SQLAlchemy dialect implementation focused on compatibility with Superset
and SQLAlchemy Core. The synchronous dialect supports SQLAlchemy 1.4 and 2.x. SQLAlchemy 1.4 compatibility is
maintained because Apache Superset currently requires sqlalchemy>=1.4,<2.
Use clickhousedb:// or clickhousedb+connect:// for synchronous connections. When
clickhouse-sqlalchemy is also installed, importing our dialect preserves its
clickhouse:// registration.
See the migration guide
for URL and schema-option compatibility.
Async SQLAlchemy usage is available with SQLAlchemy 2.0.44 and later. Install
clickhouse-connect[sqlalchemy-async] and use clickhousedb+async:// with create_async_engine(). Results are
buffered. Server-side cursors are not supported. Always await the async engine's dispose() method during shutdown
instead of calling engine.sync_engine.dispose().
Supported features include:
Basic query execution via SQLAlchemy Core
SELECT queries with JOINs (including ClickHouse-specific strictness, USING, and GLOBAL modifiers),
ARRAY JOIN (single and multi-column), FINAL, SAMPLE, compound selects, and materialized CTEs
A small number of features require SQLAlchemy 2.x. Values.cte() specifically requires SQLAlchemy 2.0.42 or later.
Certain literal-rendering behaviors also require SQLAlchemy 2.x.
All other dialect features, including those used by Superset, work on both 1.4 and 2.x.
Basic ORM usage works for insert-heavy, read-focused workloads: declarative model definitions, CREATE TABLE,
session.add(), bulk_save_objects(), and read queries all function correctly. However, full ORM support is not
provided. UPDATE compilation, foreign key/relationship reflection, autoincrement/RETURNING, and cascade operations
are not implemented. The dialect is best suited for SQLAlchemy Core usage and Superset connectivity.
Alembic Migrations
ClickHouse Connect supports Alembic for schema migrations, including
autogeneration of migration scripts from SQLAlchemy metadata. ClickHouse table engines (MergeTree,
ReplacingMergeTree, etc.) and dictionaries are preserved through the migration lifecycle.
Supported operations include create/drop table, add/alter/drop/rename column, type and nullability
changes, defaults, comments, and ClickHouse-specific features like IF EXISTS guards, column
placement with AFTER, and operation-level clickhouse_settings on column add/alter/drop.
To get started, install the Alembic extra:
pip install clickhouse-connect[alembic]
For Alembic with the async SQLAlchemy dialect, install clickhouse-connect[alembic,sqlalchemy-async], run
alembic init -t async alembic, and replace the generated alembic/env.py with the checked-in
async Alembic environment. Keep the generated
script_location = %(here)s/alembic, or update it if you chose a different migration directory. The example includes
the ClickHouse Alembic hooks and options, runs online migrations through AsyncConnection.run_sync(), and compiles
offline migrations without creating an engine.
See the Alembic worked example for a
full end-to-end walkthrough covering setup, autogeneration, upgrades, downgrades, and manual
migration operations.
Asyncio Support
ClickHouse Connect provides native async support using aiohttp. To use the async client,
install the optional async dependency:
pip install clickhouse-connect[async]
Then create a client with clickhouse_connect.get_async_client(). See the
run_async example for more details.
Complete Documentation
The documentation for ClickHouse Connect has moved to
ClickHouse Docs
ClickHouse/clickhouse-connect có 532 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/ClickHouse/clickhouse-connect. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
ClickHouse/clickhouse-connect có phải mã nguồn mở không?
Có — ClickHouse/clickhouse-connect phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/ClickHouse/clickhouse-connect.
ClickHouse/clickhouse-connect còn đang phát triển không?
Commit gần nhất trên ClickHouse/clickhouse-connect là 4 ngày trước (theo timestamp GitHub). Repo có 171 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
ClickHouse/clickhouse-connect là gì?
ClickHouse/clickhouse-connect (ClickHouse/clickhouse-connect) là dự án Python trên GitHub. Theo mô tả gốc: Python driver/sqlalchemy/superset connectors
ClickHouse/clickhouse-connect so với các dự án Backend khác thế nào?
ClickHouse/clickhouse-connect được TopGit xếp vào nhóm Backend, với 532 sao GitHub và viết bằng Python. Xem trang chủ đề Backend trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Đọc thêm về ClickHouse/clickhouse-connect ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/ClickHouse/clickhouse-connect là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
clickhouse-connect có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về clickhouse-connect.