chdb
chDB is an in-process OLAP SQL Engine powered by ClickHouse
What it is and what it does
chDB embeds ClickHouse's SQL OLAP engine directly into Python, letting you run SQL queries on local files and in-memory data without installing a separate database server. It supports multiple input/output formats (Parquet, CSV, JSON, Arrow, ORC, and 60+ others) and offers two APIs: a low-level SQL interface for direct queries, and a pandas-compatible API that compiles operations to optimized SQL.
The package is designed for analytics workflows where you need SQL performance on moderately large datasets without the operational overhead of a database server. It uses lazy evaluation to defer execution until results are needed, and minimizes data transfer between C++ and Python through memory views. Runtime dependencies include chdb-core, pandas, and pyarrow.
Use it for:
- Analyze Parquet or CSV files with SQL queries without loading them entirely into memory.
- Use familiar pandas syntax while getting ClickHouse SQL performance on large datasets.
- Execute SQL queries on multiple file formats and data sources with a unified interface.
- Build interactive data exploration workflows in Jupyter notebooks with lazy evaluation.
- Perform aggregations and groupby operations on large datasets using ClickHouse's multi-threaded engine.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
chDB is an in-process SQL OLAP engine powered by ClickHouse that executes SQL queries on local data without requiring a separate ClickHouse server installation.
Yes. chDB is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It fills a clear niche for developers who want SQL analytics performance without database infrastructure. The pandas-compatible API lowers the learning curve for existing pandas users, and the SQL API provides escape hatches for advanced ClickHouse features.
Install
chdb on PyPI
pip
pip install chdbuv
uv add chdbpoetry
poetry add chdbInstalling chdb
Before you install
Low friction: pure Python wheel with three runtime dependencies (chdb-core, pandas, pyarrow). Active maintenance with a recent release (32 days old) and 2868 repository stars.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install chdb
import chdb
res = chdb.query('SELECT 1 as num', 'Pretty')
print(res)
# Or with pandas:
import pandas
df = pandas.DataFrame({'name': ['Alice', 'Bob'], 'age': [25, 30]})
print(df[df['age'] > 26])
Requires Python 3.9+; supports macOS and Linux (x86_64 and ARM64) only.
Verify before relying
- Whether the pandas-compatible API is fully production-ready or still experimental.
- Performance characteristics and memory overhead when processing datasets larger than available RAM.
- Support status for Windows or other operating systems beyond macOS and Linux.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — chdb-core, pandas, pyarrow |
| Maintenance | actively maintained — 32 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,493,256/month — #2,601 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: chdb-4.2.1-py3-none-any.whl
Keywords: chdb, clickhouse, olap, analytics, database, sql
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
chdb-corechdb-core is an in-process SQL OLAP engine…
permissive · top 15,000 on PyPI
mcp-clickhouseAn MCP server that exposes ClickHouse database…
permissive · top 15,000 on PyPI
duckdbDuckDB is an in-process SQL database engine…
permissive · top 1,000 on PyPI
clickhouse-connectA Python database driver for ClickHouse that…
permissive · top 1,000 on PyPI
clickhouse-driverA native TCP driver for ClickHouse that…
permissive · top 5,000 on PyPI
clickhouse-migrationsApplies versioned SQL migrations to ClickHouse…
permissive · top 15,000 on PyPI
qpdQPD translates SQL SELECT statements into…
permissive · top 15,000 on PyPI
airflow-clickhouse-pluginProvides Apache Airflow operators and hooks to…
permissive · top 15,000 on PyPI
aiochclientAn async HTTP client for ClickHouse that…
permissive · top 15,000 on PyPI
asynchasynch is an asynchronous ClickHouse driver…
permissive · top 5,000 on PyPI