chDB is an in-process SQL OLAP Engine powered by ClickHouse
Project description
chDB
chDB is an embedded SQL OLAP Engine powered by ClickHouse
Features
- In-process SQL OLAP Engine, powered by ClickHouse
- No need to install ClickHouse
- Minimized data copy from C++ to Python with python memoryview
- Input&Output support Parquet, CSV, JSON, Arrow, ORC and 60+more formats, samples
- Support Python DB API 2.0, example
Arch
Installation
Currently, chDB only supports Python 3.7+ on macOS(x86_64 and ARM64) and Linux.
pip install chdb
Usage
Run in command line
python3 -m chdb SQL [OutputFormat]
python3 -m chdb "SELECT 1,'abc'" Pretty
Currently, chDB only supports query function, which is used to execute SQL and return desired format data.
import chdb
res = chdb.query('select version()', 'Pretty'); print(res.data())
Work with Parquet or CSV
# See more data type format in tests/format_output.py
res = chdb.query('select * from file("data.parquet", Parquet)', 'JSON'); print(res.data())
# With large data result, get_memview() is more quickly cos it does not do an extra data copy.
res = chdb.query('select * from file("data.csv", CSV)', 'CSV'); print(str(res.get_memview().tobytes()))
Pandas dataframe output
# See more in https://clickhouse.com/docs/en/interfaces/formats
chdb.query('select * from file("data.parquet", Parquet)', 'Dataframe')
Demos and Examples
Benchmark
Documentation
- For SQL syntax, please refer to ClickHouse SQL Reference
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. There are something you can help:
- Help me with Windows support, I don't know much about Windows toolchain.
- The Python Wrapper just have a
queryfunction. I want to add more functions to make it more convenient to use. liketoPandas,toNumpyand so on.
License
AGPL-v3.0 or Commercial License, see LICENSE for more information.
Acknowledgments
chDB is mainly based on ClickHouse for trade mark and other reasons, I named it chDB.
Contact
- Discord: https://discord.gg/nqSkfJRR
- Email: auxtenwpc@gmail.com
- Twitter: @auxten
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chdb-0.9.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: chdb-0.9.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 109.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b85fb6bb36e35c0f1709024b986b24ee91c8545fec56e633fc855f80dd03326c
|
|
| MD5 |
f8d37e39fc6c9a1dc4ad6197cf615235
|
|
| BLAKE2b-256 |
e377728b490e0f15e7117bb0a006c16b36b49a0804d1ecd9fe96e2e3d2b06707
|
File details
Details for the file chdb-0.9.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: chdb-0.9.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 66.8 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fa5a7bff1784aa91a44aa2b2ad461a0cfa9b86e8e3dacf6a3a2b6d532c0de2b
|
|
| MD5 |
f5067b662b08c77677e6cf1b5030e849
|
|
| BLAKE2b-256 |
94c946deebb574c1cf529df9244054ad7c526a38d7e30eaa307dd27e5cb2057e
|
File details
Details for the file chdb-0.9.0-cp311-cp311-macosx_10_15_x86_64.whl.
File metadata
- Download URL: chdb-0.9.0-cp311-cp311-macosx_10_15_x86_64.whl
- Upload date:
- Size: 88.7 MB
- Tags: CPython 3.11, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
276ed8a2d412b796bd8b2400d21d2b5dbea0d35bc7fba860ae16547b99bcbf50
|
|
| MD5 |
b4fb7f68591a4f528bf62be4ddd32664
|
|
| BLAKE2b-256 |
74b87121ce5f9e65fa20c223024908ece31564378b27e7367f170b14b5f1d665
|
File details
Details for the file chdb-0.9.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: chdb-0.9.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 109.0 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfa278791f1ac278504ccf86c27d793c4081c017840d0d8040d19fb3b510a896
|
|
| MD5 |
490a8bc6ec158c80925ccfa63c8c2e17
|
|
| BLAKE2b-256 |
d31a620b7f441a2020e5c73a585479ef85d41f474d766c0175d9c8572fd47b93
|
File details
Details for the file chdb-0.9.0-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: chdb-0.9.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 66.8 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8863514893905616bdc64ecd183b1a4d78b7960ce8bc8e57fb92176b21bc76fc
|
|
| MD5 |
92c62b59eadc19f2aa53bbe9314fd9cb
|
|
| BLAKE2b-256 |
119efb8357990ed7e6882dc5140ffececa6ded674e7928010ac76aee576d3831
|
File details
Details for the file chdb-0.9.0-cp310-cp310-macosx_10_15_x86_64.whl.
File metadata
- Download URL: chdb-0.9.0-cp310-cp310-macosx_10_15_x86_64.whl
- Upload date:
- Size: 88.7 MB
- Tags: CPython 3.10, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
977e52092db976b3767e45e6cbd1f4228ab6834c86c516fb05faf4012258285a
|
|
| MD5 |
7028a9ca0083cfceae98f2b00d308278
|
|
| BLAKE2b-256 |
f949252664ec701e2b716567a568ef48cc3422a52330abbfd7fc448eb83c8ee4
|
File details
Details for the file chdb-0.9.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: chdb-0.9.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 109.0 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79f2a3802fb3e9dec069bd1e3b6ebf67f4dfc9f9e9be437e83153e575a6d1ee6
|
|
| MD5 |
120e9956addd3439c9f6a47ed25962ae
|
|
| BLAKE2b-256 |
8118c4d4bb27714bcdb4962b22bf23496ccd4c2ff2d01dba8c47e399023367c7
|
File details
Details for the file chdb-0.9.0-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: chdb-0.9.0-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 66.8 MB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
422257f73082a1335e4f7e1ae86845b391bd4b05315cec2e4935cae628315c41
|
|
| MD5 |
c8bf1e13de7e530f91163a7f9f98d699
|
|
| BLAKE2b-256 |
cda2af3d655984eeefdfe7c4637c8c84516648f9e02cc790ae3e7b0601971192
|
File details
Details for the file chdb-0.9.0-cp39-cp39-macosx_10_15_x86_64.whl.
File metadata
- Download URL: chdb-0.9.0-cp39-cp39-macosx_10_15_x86_64.whl
- Upload date:
- Size: 88.7 MB
- Tags: CPython 3.9, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42d931c18c7d02e8be65ae2c300661c5ad46d97584d41bcce0ae2d54c27316c7
|
|
| MD5 |
573fdabc8ff74c91ac9dea6a2090337f
|
|
| BLAKE2b-256 |
8e0a1621de73a2e9f9cabb0ec60b9f02eb794b472cf8bf2d19238464a8702a7b
|
File details
Details for the file chdb-0.9.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: chdb-0.9.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 109.0 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fce43344e7d419f9b34add0811407ebb05d87af0bc3f148f4ada26ba527aeb8
|
|
| MD5 |
f753aacc0c5251edf3701d4010cbcd9e
|
|
| BLAKE2b-256 |
55ebe41d0b9b7206d8f15f699b445620a16d7da99f3a772bfa8f193961754f31
|
File details
Details for the file chdb-0.9.0-cp38-cp38-macosx_10_15_x86_64.whl.
File metadata
- Download URL: chdb-0.9.0-cp38-cp38-macosx_10_15_x86_64.whl
- Upload date:
- Size: 88.7 MB
- Tags: CPython 3.8, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a47c21d91328b580c6f96aa42e784cd81bbdf35dba84ed146ea06c8b141d163a
|
|
| MD5 |
24101ccc2a2aaeb4b69fa7e2ba59ef12
|
|
| BLAKE2b-256 |
862ffbd258c9f8c466b4bb3abcc0f8894c3e4e0f83e7c3034523e1f5a77e6b47
|
File details
Details for the file chdb-0.9.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: chdb-0.9.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 109.0 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab085c4b75c92ad75d1cf0b986609398c8cb8eb763cf5b460bd37e7aa9f3ef53
|
|
| MD5 |
d7c2130a16b819b353db3232d52a55f3
|
|
| BLAKE2b-256 |
a635548fda6bf7b412f07a1119354797ff8140d7789edcd6eba563ec6e6768be
|
File details
Details for the file chdb-0.9.0-cp37-cp37m-macosx_10_15_x86_64.whl.
File metadata
- Download URL: chdb-0.9.0-cp37-cp37m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 88.7 MB
- Tags: CPython 3.7m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c7ea036c766c5beae246cec2a52031fbf65fa6d1aa26a1df9d83e3a9bbf586d
|
|
| MD5 |
8e11422297b5da9ffedbbc6e1c153309
|
|
| BLAKE2b-256 |
77d22498df6ed148fe602d2a309e2e9934e3626b3c254b4a1009ded6696b659f
|