Skip to main content

chDB is an in-process SQL OLAP Engine powered by ClickHouse

Project description

Build PyPI Monthly Downloads Discord Twitter

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

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 query function. I want to add more functions to make it more convenient to use. like toPandas, toNumpy and 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

chdb-0.9.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (109.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

chdb-0.9.0-cp311-cp311-macosx_11_0_arm64.whl (66.8 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

chdb-0.9.0-cp311-cp311-macosx_10_15_x86_64.whl (88.7 MB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

chdb-0.9.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (109.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

chdb-0.9.0-cp310-cp310-macosx_11_0_arm64.whl (66.8 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

chdb-0.9.0-cp310-cp310-macosx_10_15_x86_64.whl (88.7 MB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

chdb-0.9.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (109.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

chdb-0.9.0-cp39-cp39-macosx_11_0_arm64.whl (66.8 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

chdb-0.9.0-cp39-cp39-macosx_10_15_x86_64.whl (88.7 MB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

chdb-0.9.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (109.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

chdb-0.9.0-cp38-cp38-macosx_10_15_x86_64.whl (88.7 MB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

chdb-0.9.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (109.0 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

chdb-0.9.0-cp37-cp37m-macosx_10_15_x86_64.whl (88.7 MB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

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

File hashes

Hashes for chdb-0.9.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b85fb6bb36e35c0f1709024b986b24ee91c8545fec56e633fc855f80dd03326c
MD5 f8d37e39fc6c9a1dc4ad6197cf615235
BLAKE2b-256 e377728b490e0f15e7117bb0a006c16b36b49a0804d1ecd9fe96e2e3d2b06707

See more details on using hashes here.

File details

Details for the file chdb-0.9.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chdb-0.9.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4fa5a7bff1784aa91a44aa2b2ad461a0cfa9b86e8e3dacf6a3a2b6d532c0de2b
MD5 f5067b662b08c77677e6cf1b5030e849
BLAKE2b-256 94c946deebb574c1cf529df9244054ad7c526a38d7e30eaa307dd27e5cb2057e

See more details on using hashes here.

File details

Details for the file chdb-0.9.0-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for chdb-0.9.0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 276ed8a2d412b796bd8b2400d21d2b5dbea0d35bc7fba860ae16547b99bcbf50
MD5 b4fb7f68591a4f528bf62be4ddd32664
BLAKE2b-256 74b87121ce5f9e65fa20c223024908ece31564378b27e7367f170b14b5f1d665

See more details on using hashes here.

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

File hashes

Hashes for chdb-0.9.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bfa278791f1ac278504ccf86c27d793c4081c017840d0d8040d19fb3b510a896
MD5 490a8bc6ec158c80925ccfa63c8c2e17
BLAKE2b-256 d31a620b7f441a2020e5c73a585479ef85d41f474d766c0175d9c8572fd47b93

See more details on using hashes here.

File details

Details for the file chdb-0.9.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chdb-0.9.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8863514893905616bdc64ecd183b1a4d78b7960ce8bc8e57fb92176b21bc76fc
MD5 92c62b59eadc19f2aa53bbe9314fd9cb
BLAKE2b-256 119efb8357990ed7e6882dc5140ffececa6ded674e7928010ac76aee576d3831

See more details on using hashes here.

File details

Details for the file chdb-0.9.0-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for chdb-0.9.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 977e52092db976b3767e45e6cbd1f4228ab6834c86c516fb05faf4012258285a
MD5 7028a9ca0083cfceae98f2b00d308278
BLAKE2b-256 f949252664ec701e2b716567a568ef48cc3422a52330abbfd7fc448eb83c8ee4

See more details on using hashes here.

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

File hashes

Hashes for chdb-0.9.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 79f2a3802fb3e9dec069bd1e3b6ebf67f4dfc9f9e9be437e83153e575a6d1ee6
MD5 120e9956addd3439c9f6a47ed25962ae
BLAKE2b-256 8118c4d4bb27714bcdb4962b22bf23496ccd4c2ff2d01dba8c47e399023367c7

See more details on using hashes here.

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

Hashes for chdb-0.9.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 422257f73082a1335e4f7e1ae86845b391bd4b05315cec2e4935cae628315c41
MD5 c8bf1e13de7e530f91163a7f9f98d699
BLAKE2b-256 cda2af3d655984eeefdfe7c4637c8c84516648f9e02cc790ae3e7b0601971192

See more details on using hashes here.

File details

Details for the file chdb-0.9.0-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for chdb-0.9.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 42d931c18c7d02e8be65ae2c300661c5ad46d97584d41bcce0ae2d54c27316c7
MD5 573fdabc8ff74c91ac9dea6a2090337f
BLAKE2b-256 8e0a1621de73a2e9f9cabb0ec60b9f02eb794b472cf8bf2d19238464a8702a7b

See more details on using hashes here.

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

File hashes

Hashes for chdb-0.9.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5fce43344e7d419f9b34add0811407ebb05d87af0bc3f148f4ada26ba527aeb8
MD5 f753aacc0c5251edf3701d4010cbcd9e
BLAKE2b-256 55ebe41d0b9b7206d8f15f699b445620a16d7da99f3a772bfa8f193961754f31

See more details on using hashes here.

File details

Details for the file chdb-0.9.0-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for chdb-0.9.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 a47c21d91328b580c6f96aa42e784cd81bbdf35dba84ed146ea06c8b141d163a
MD5 24101ccc2a2aaeb4b69fa7e2ba59ef12
BLAKE2b-256 862ffbd258c9f8c466b4bb3abcc0f8894c3e4e0f83e7c3034523e1f5a77e6b47

See more details on using hashes here.

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

File hashes

Hashes for chdb-0.9.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ab085c4b75c92ad75d1cf0b986609398c8cb8eb763cf5b460bd37e7aa9f3ef53
MD5 d7c2130a16b819b353db3232d52a55f3
BLAKE2b-256 a635548fda6bf7b412f07a1119354797ff8140d7789edcd6eba563ec6e6768be

See more details on using hashes here.

File details

Details for the file chdb-0.9.0-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for chdb-0.9.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 9c7ea036c766c5beae246cec2a52031fbf65fa6d1aa26a1df9d83e3a9bbf586d
MD5 8e11422297b5da9ffedbbc6e1c153309
BLAKE2b-256 77d22498df6ed148fe602d2a309e2e9934e3626b3c254b4a1009ded6696b659f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page