Installing chDB for Python
Requirements
Python 3.8+ on macOS and Linux (x86_64 and ARM64)
Install
pip install chdb
Usage
CLI example:
python3 -m chdb [SQL] [OutputFormat]
python3 -m chdb "SELECT 1, 'abc'" Pretty
Python file example:
import chdb
res = chdb.query("SELECT 1, 'abc'", "CSV")
print(res, end="")
Queries can return data using any supported format as well as Dataframe
and Debug
.