33 <img src =" docs/_static/snake-chdb.png " height =" 100 " >
44</div >
55
6- [ ![ Build] ( https://github.com/auxten/chdb/actions/workflows/build_wheels.yml/badge.svg )] ( https://github.com/auxten/chdb/actions/workflows/build_wheels.yml )
6+ [ ![ Build] ( https://github.com/auxten/chdb/actions/workflows/build_wheels.yml/badge.svg?branch=pybind )] ( https://github.com/auxten/chdb/actions/workflows/build_wheels.yml )
77[ ![ PyPI] ( https://img.shields.io/pypi/v/chdb.svg )] ( https://pypi.org/project/chdb/ )
88[ ![ Monthly Downloads] ( https://pepy.tech/badge/chdb/month )] ( https://pepy.tech/project/chdb )
9+ [ ![ Discord] ( https://img.shields.io/discord/1098133460310294528?logo=Discord )] ( https://discord.gg/Njw5YXSPPc )
910[ ![ Twitter] ( https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Twitter )] ( https://twitter.com/auxten )
1011
1112# chDB
1213
13- > chDB is an in-process SQL OLAP Engine powered by ClickHouse
14+ [ 中文] ( README-zh.md )
15+
16+ > chDB is an embedded SQL OLAP Engine powered by ClickHouse
1417
1518
1619## Features
1720
1821* In-process SQL OLAP Engine, powered by ClickHouse
1922* No need to install ClickHouse
2023* Minimized data copy from C++ to Python with [ python memoryview] ( https://docs.python.org/3/c-api/memoryview.html )
21- * Input&Output support Parquet, CSV, JSON, Arrow, ORC and [ more] ( https://clickhouse.com/docs/en/interfaces/formats )
24+ * Input&Output support Parquet, CSV, JSON, Arrow, ORC and 60+ [ more] ( https://clickhouse.com/docs/en/interfaces/formats ) formats, [ samples ] ( tests/format_output.py )
2225
2326## Arch
2427<div align =" center " >
@@ -33,32 +36,36 @@ pip install chdb
3336
3437## Usage
3538
39+ ### Run in command line
40+ > ` python3 -m chdb SQL [OutputFormat] `
41+ ``` bash
42+ python3 -m chdb " SELECT 1,'abc'" Pretty
43+ ```
44+
3645Currently, chDB only supports ` query ` function, which is used to execute SQL and return desired format data.
3746
3847``` python
3948import chdb
4049res = chdb.query(' select version()' , ' Pretty' ); print (res.data())
4150```
4251
43- ### work with Parquet or CSV
52+ ### Work with Parquet or CSV
4453``` python
4554# See more data type format in tests/format_output.py
46- res = chdb.query(' select * from file("data.parquet", Parquet)' , ' JSON' ); print (res.get_memview().tobytes().decode( " utf-8 " ))
55+ res = chdb.query(' select * from file("data.parquet", Parquet)' , ' JSON' ); print (res.data( ))
4756# With large data result, get_memview() is more quickly cos it does not do an extra data copy.
4857res = chdb.query(' select * from file("data.csv", CSV)' , ' CSV' ); print (str (res.get_memview().tobytes()))
4958```
5059
51- ### pandas dataframe output
60+ ### Pandas dataframe output
5261``` python
53- # Input type and output type support may different.
5462# See more in https://clickhouse.com/docs/en/interfaces/formats
5563chdb.query(' select * from file("data.parquet", Parquet)' , ' Dataframe' )
5664```
5765
58- more examples, please refer to [ examples] ( examples )
59-
60- ## Demos
66+ ## Demos and Examples
6167
68+ - [ Examples] ( examples )
6269- [ Serverless Query Demo] ( https://chdb.fly.dev/?user=default#Ly8gaHR0cHM6Ly9naXRodWIuY29tL21ldHJpY28vY2hkYi1zZXJ2ZXIKU0VMRUNUCiAgICB0b3duLAogICAgZGlzdHJpY3QsCiAgICBjb3VudCgpIEFTIGMsCiAgICByb3VuZChhdmcocHJpY2UpKSBBUyBwcmljZQpGUk9NIHVybCgnaHR0cHM6Ly9kYXRhc2V0cy1kb2N1bWVudGF0aW9uLnMzLmV1LXdlc3QtMy5hbWF6b25hd3MuY29tL2hvdXNlX3BhcnF1ZXQvaG91c2VfMC5wYXJxdWV0JykKR1JPVVAgQlkKICAgIHRvd24sCiAgICBkaXN0cmljdApMSU1JVCAxMA== )
6370
6471## Benchmark
@@ -71,7 +78,6 @@ more examples, please refer to [examples](examples)
7178## Contributing
7279Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are ** greatly appreciated** .
7380There are something you can help:
74- - Report bugs on [ GitHub Issues] ( https://github.com/auxten/chdb/issues ) .
7581- [ ] Help me with Windows support, I don't know much about Windows toolchain.
7682- [x] 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.
7783
0 commit comments