chdb 3.4.0__cp38-cp38-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of chdb might be problematic. Click here for more details.

@@ -0,0 +1,529 @@
1
+ Metadata-Version: 2.1
2
+ Name: chdb
3
+ Version: 3.4.0
4
+ Summary: chDB is an in-process SQL OLAP Engine powered by ClickHouse
5
+ Home-page: https://github.com/chdb-io/chdb
6
+ Author: auxten
7
+ Author-email: auxten@clickhouse.com
8
+ License: Apache-2.0
9
+ Project-URL: Homepage, https://clickhouse.com/chdb
10
+ Project-URL: Documentation, https://clickhouse.com/docs/en/chdb
11
+ Project-URL: Source, https://github.com/chdb-io/chdb
12
+ Project-URL: Download, https://pypi.org/project/chdb/#files
13
+ Project-URL: Twitter, https://twitter.com/chdb_io
14
+ Platform: Mac
15
+ Platform: Linux
16
+ Classifier: Development Status :: 4 - Beta
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Classifier: Operating System :: MacOS :: MacOS X
20
+ Classifier: Operating System :: POSIX
21
+ Classifier: Programming Language :: Python :: 3.8
22
+ Classifier: Programming Language :: Python :: 3.9
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Topic :: Database
27
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
28
+ Requires-Python: >=3.8
29
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
30
+ License-File: LICENSE.txt
31
+ Requires-Dist: pyarrow >=13.0.0
32
+ Requires-Dist: pandas >=2.0.0
33
+
34
+ <div align="center">
35
+ <a href="https://clickhouse.com/blog/chdb-joins-clickhouse-family">📢 chDB joins the ClickHouse family 🐍+🚀</a>
36
+ </div>
37
+ <div align="center">
38
+ <picture>
39
+ <source media="(prefers-color-scheme: dark)" srcset="https://github.com/chdb-io/chdb/raw/main/docs/_static/snake-chdb-dark.png" height="130">
40
+ <img src="https://github.com/chdb-io/chdb/raw/main/docs/_static/snake-chdb.png" height="130">
41
+ </picture>
42
+
43
+ [![Build X86](https://github.com/chdb-io/chdb/actions/workflows/build_linux_x86_wheels.yml/badge.svg?event=release)](https://github.com/chdb-io/chdb/actions/workflows/build_linux_x86_wheels.yml)
44
+ [![PyPI](https://img.shields.io/pypi/v/chdb.svg)](https://pypi.org/project/chdb/)
45
+ [![Downloads](https://static.pepy.tech/badge/chdb)](https://pepy.tech/project/chdb)
46
+ [![Discord](https://img.shields.io/discord/1098133460310294528?logo=Discord)](https://discord.gg/D2Daa2fM5K)
47
+ [![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Twitter)](https://twitter.com/chdb_io)
48
+ </div>
49
+
50
+ # chDB
51
+
52
+
53
+ > chDB is an in-process SQL OLAP Engine powered by ClickHouse [^1]
54
+ > For more details: [The birth of chDB](https://auxten.com/the-birth-of-chdb/)
55
+
56
+
57
+ ## Features
58
+
59
+ * In-process SQL OLAP Engine, powered by ClickHouse
60
+ * No need to install ClickHouse
61
+ * Minimized data copy from C++ to Python with [python memoryview](https://docs.python.org/3/c-api/memoryview.html)
62
+ * Input&Output support Parquet, CSV, JSON, Arrow, ORC and 60+[more](https://clickhouse.com/docs/en/interfaces/formats) formats, [samples](tests/format_output.py)
63
+ * Support Python DB API 2.0, [example](examples/dbapi.py)
64
+
65
+
66
+
67
+ ## Arch
68
+ <div align="center">
69
+ <img src="https://github.com/chdb-io/chdb/raw/main/docs/_static/arch-chdb3.png" width="450">
70
+ </div>
71
+
72
+ ## Get Started
73
+ Get started with **chdb** using our [Installation and Usage Examples](https://clickhouse.com/docs/en/chdb)
74
+
75
+ <br>
76
+
77
+ ## Installation
78
+ Currently, chDB supports Python 3.8+ on macOS and Linux (x86_64 and ARM64).
79
+ ```bash
80
+ pip install chdb
81
+ ```
82
+
83
+ ## Usage
84
+
85
+ ### Run in command line
86
+ > `python3 -m chdb SQL [OutputFormat]`
87
+ ```bash
88
+ python3 -m chdb "SELECT 1,'abc'" Pretty
89
+ ```
90
+
91
+ <br>
92
+
93
+ ### Data Input
94
+ The following methods are available to access on-disk and in-memory data formats:
95
+
96
+ <details>
97
+ <summary><h4>🗂️ Connection based API (recommended)</h4></summary>
98
+
99
+ ```python
100
+ import chdb
101
+
102
+ # Create a connection (in-memory by default)
103
+ conn = chdb.connect(":memory:")
104
+ # Or use file-based: conn = chdb.connect("test.db")
105
+
106
+ # Create a cursor
107
+ cur = conn.cursor()
108
+
109
+ # Execute queries
110
+ cur.execute("SELECT number, toString(number) as str FROM system.numbers LIMIT 3")
111
+
112
+ # Fetch data in different ways
113
+ print(cur.fetchone()) # Single row: (0, '0')
114
+ print(cur.fetchmany(2)) # Multiple rows: ((1, '1'), (2, '2'))
115
+
116
+ # Get column information
117
+ print(cur.column_names()) # ['number', 'str']
118
+ print(cur.column_types()) # ['UInt64', 'String']
119
+
120
+ # Use the cursor as an iterator
121
+ cur.execute("SELECT number FROM system.numbers LIMIT 3")
122
+ for row in cur:
123
+ print(row)
124
+
125
+ # Always close resources when done
126
+ cur.close()
127
+ conn.close()
128
+ ```
129
+
130
+ For more details, see [examples/connect.py](examples/connect.py).
131
+ </details>
132
+
133
+
134
+ <details>
135
+ <summary><h4>🗂️ Query On File</h4> (Parquet, CSV, JSON, Arrow, ORC and 60+)</summary>
136
+
137
+ You can execute SQL and return desired format data.
138
+
139
+ ```python
140
+ import chdb
141
+ res = chdb.query('select version()', 'Pretty'); print(res)
142
+ ```
143
+
144
+ ### Work with Parquet or CSV
145
+ ```python
146
+ # See more data type format in tests/format_output.py
147
+ res = chdb.query('select * from file("data.parquet", Parquet)', 'JSON'); print(res)
148
+ res = chdb.query('select * from file("data.csv", CSV)', 'CSV'); print(res)
149
+ print(f"SQL read {res.rows_read()} rows, {res.bytes_read()} bytes, storage read {res.storage_rows_read()} rows, {res.storage_bytes_read()} bytes, elapsed {res.elapsed()} seconds")
150
+ ```
151
+
152
+ ### Pandas dataframe output
153
+ ```python
154
+ # See more in https://clickhouse.com/docs/en/interfaces/formats
155
+ chdb.query('select * from file("data.parquet", Parquet)', 'Dataframe')
156
+ ```
157
+ </details>
158
+
159
+ <details>
160
+ <summary><h4>🗂️ Query On Table</h4> (Pandas DataFrame, Parquet file/bytes, Arrow bytes) </summary>
161
+
162
+ ### Query On Pandas DataFrame
163
+ ```python
164
+ import chdb.dataframe as cdf
165
+ import pandas as pd
166
+ # Join 2 DataFrames
167
+ df1 = pd.DataFrame({'a': [1, 2, 3], 'b': ["one", "two", "three"]})
168
+ df2 = pd.DataFrame({'c': [1, 2, 3], 'd': ["①", "②", "③"]})
169
+ ret_tbl = cdf.query(sql="select * from __tbl1__ t1 join __tbl2__ t2 on t1.a = t2.c",
170
+ tbl1=df1, tbl2=df2)
171
+ print(ret_tbl)
172
+ # Query on the DataFrame Table
173
+ print(ret_tbl.query('select b, sum(a) from __table__ group by b'))
174
+ # Pandas DataFrames are automatically registered as temporary tables in ClickHouse
175
+ chdb.query("SELECT * FROM Python(df1) t1 JOIN Python(df2) t2 ON t1.a = t2.c").show()
176
+ ```
177
+ </details>
178
+
179
+ <details>
180
+ <summary><h4>🗂️ Query with Stateful Session</h4></summary>
181
+
182
+ ```python
183
+ from chdb import session as chs
184
+
185
+ ## Create DB, Table, View in temp session, auto cleanup when session is deleted.
186
+ sess = chs.Session()
187
+ sess.query("CREATE DATABASE IF NOT EXISTS db_xxx ENGINE = Atomic")
188
+ sess.query("CREATE TABLE IF NOT EXISTS db_xxx.log_table_xxx (x String, y Int) ENGINE = Log;")
189
+ sess.query("INSERT INTO db_xxx.log_table_xxx VALUES ('a', 1), ('b', 3), ('c', 2), ('d', 5);")
190
+ sess.query(
191
+ "CREATE VIEW db_xxx.view_xxx AS SELECT * FROM db_xxx.log_table_xxx LIMIT 4;"
192
+ )
193
+ print("Select from view:\n")
194
+ print(sess.query("SELECT * FROM db_xxx.view_xxx", "Pretty"))
195
+ ```
196
+
197
+ see also: [test_stateful.py](tests/test_stateful.py).
198
+ </details>
199
+
200
+ <details>
201
+ <summary><h4>🗂️ Query with Python DB-API 2.0</h4></summary>
202
+
203
+ ```python
204
+ import chdb.dbapi as dbapi
205
+ print("chdb driver version: {0}".format(dbapi.get_client_info()))
206
+
207
+ conn1 = dbapi.connect()
208
+ cur1 = conn1.cursor()
209
+ cur1.execute('select version()')
210
+ print("description: ", cur1.description)
211
+ print("data: ", cur1.fetchone())
212
+ cur1.close()
213
+ conn1.close()
214
+ ```
215
+ </details>
216
+
217
+
218
+ <details>
219
+ <summary><h4>🗂️ Query with UDF (User Defined Functions)</h4></summary>
220
+
221
+ ```python
222
+ from chdb.udf import chdb_udf
223
+ from chdb import query
224
+
225
+ @chdb_udf()
226
+ def sum_udf(lhs, rhs):
227
+ return int(lhs) + int(rhs)
228
+
229
+ print(query("select sum_udf(12,22)"))
230
+ ```
231
+
232
+ Some notes on chDB Python UDF(User Defined Function) decorator.
233
+ 1. The function should be stateless. So, only UDFs are supported, not UDAFs(User Defined Aggregation Function).
234
+ 2. Default return type is String. If you want to change the return type, you can pass in the return type as an argument.
235
+ The return type should be one of the following: https://clickhouse.com/docs/en/sql-reference/data-types
236
+ 3. The function should take in arguments of type String. As the input is TabSeparated, all arguments are strings.
237
+ 4. The function will be called for each line of input. Something like this:
238
+ ```
239
+ def sum_udf(lhs, rhs):
240
+ return int(lhs) + int(rhs)
241
+
242
+ for line in sys.stdin:
243
+ args = line.strip().split('\t')
244
+ lhs = args[0]
245
+ rhs = args[1]
246
+ print(sum_udf(lhs, rhs))
247
+ sys.stdout.flush()
248
+ ```
249
+ 5. The function should be pure python function. You SHOULD import all python modules used IN THE FUNCTION.
250
+ ```
251
+ def func_use_json(arg):
252
+ import json
253
+ ...
254
+ ```
255
+ 6. Python interpertor used is the same as the one used to run the script. Get from `sys.executable`
256
+
257
+ see also: [test_udf.py](tests/test_udf.py).
258
+ </details>
259
+
260
+
261
+ <details>
262
+ <summary><h4>🗂️ Streaming Query</h4></summary>
263
+
264
+ Process large datasets with constant memory usage through chunked streaming.
265
+
266
+ ```python
267
+ from chdb import session as chs
268
+
269
+ sess = chs.Session()
270
+
271
+ # Example 1: Basic example of using streaming query
272
+ rows_cnt = 0
273
+ with sess.send_query("SELECT * FROM numbers(200000)", "CSV") as stream_result:
274
+ for chunk in stream_result:
275
+ rows_cnt += chunk.rows_read()
276
+
277
+ print(rows_cnt) # 200000
278
+
279
+ # Example 2: Manual iteration with fetch()
280
+ rows_cnt = 0
281
+ stream_result = sess.send_query("SELECT * FROM numbers(200000)", "CSV")
282
+ while True:
283
+ chunk = stream_result.fetch()
284
+ if chunk is None:
285
+ break
286
+ rows_cnt += chunk.rows_read()
287
+
288
+ print(rows_cnt) # 200000
289
+
290
+ # Example 3: Early cancellation demo
291
+ rows_cnt = 0
292
+ stream_result = sess.send_query("SELECT * FROM numbers(200000)", "CSV")
293
+ while True:
294
+ chunk = stream_result.fetch()
295
+ if chunk is None:
296
+ break
297
+ if rows_cnt > 0:
298
+ stream_result.cancel()
299
+ break
300
+ rows_cnt += chunk.rows_read()
301
+
302
+ print(rows_cnt) # 65409
303
+
304
+ sess.close()
305
+ ```
306
+
307
+ For more details, see [test_streaming_query.py](tests/test_streaming_query.py).
308
+ </details>
309
+
310
+
311
+ <details>
312
+ <summary><h4>🗂️ Python Table Engine</h4></summary>
313
+
314
+ ### Query on Pandas DataFrame
315
+
316
+ ```python
317
+ import chdb
318
+ import pandas as pd
319
+ df = pd.DataFrame(
320
+ {
321
+ "a": [1, 2, 3, 4, 5, 6],
322
+ "b": ["tom", "jerry", "auxten", "tom", "jerry", "auxten"],
323
+ "dict_col": [
324
+ {'id': 1, 'tags': ['urgent', 'important'], 'metadata': {'created': '2024-01-01'}},
325
+ {'id': 2, 'tags': ['normal'], 'metadata': {'created': '2024-02-01'}},
326
+ {'id': 3, 'name': 'tom'},
327
+ {'id': 4, 'value': '100'},
328
+ {'id': 5, 'value': 101},
329
+ {'id': 6, 'value': 102},
330
+ ],
331
+ }
332
+ )
333
+
334
+ chdb.query("SELECT b, sum(a) FROM Python(df) GROUP BY b ORDER BY b").show()
335
+ chdb.query("SELECT dict_col.id FROM Python(df) WHERE dict_col.value='100'").show()
336
+ ```
337
+
338
+ ### Query on Arrow Table
339
+
340
+ ```python
341
+ import chdb
342
+ import pyarrow as pa
343
+ arrow_table = pa.table(
344
+ {
345
+ "a": [1, 2, 3, 4, 5, 6],
346
+ "b": ["tom", "jerry", "auxten", "tom", "jerry", "auxten"],
347
+ "dict_col": [
348
+ {'id': 1, 'value': 'tom'},
349
+ {'id': 2, 'value': 'jerry'},
350
+ {'id': 3, 'value': 'auxten'},
351
+ {'id': 4, 'value': 'tom'},
352
+ {'id': 5, 'value': 'jerry'},
353
+ {'id': 6, 'value': 'auxten'},
354
+ ],
355
+ }
356
+ )
357
+
358
+ chdb.query("SELECT b, sum(a) FROM Python(arrow_table) GROUP BY b ORDER BY b").show()
359
+ chdb.query("SELECT dict_col.id FROM Python(arrow_table) WHERE dict_col.value='tom'").show()
360
+ ```
361
+
362
+ ### Query on chdb.PyReader class instance
363
+
364
+ 1. You must inherit from chdb.PyReader class and implement the `read` method.
365
+ 2. The `read` method should:
366
+ 1. return a list of lists, the first demension is the column, the second dimension is the row, the columns order should be the same as the first arg `col_names` of `read`.
367
+ 1. return an empty list when there is no more data to read.
368
+ 1. be stateful, the cursor should be updated in the `read` method.
369
+ 3. An optional `get_schema` method can be implemented to return the schema of the table. The prototype is `def get_schema(self) -> List[Tuple[str, str]]:`, the return value is a list of tuples, each tuple contains the column name and the column type. The column type should be one of the following: https://clickhouse.com/docs/en/sql-reference/data-types
370
+
371
+ ```python
372
+ import chdb
373
+
374
+ class myReader(chdb.PyReader):
375
+ def __init__(self, data):
376
+ self.data = data
377
+ self.cursor = 0
378
+ super().__init__(data)
379
+
380
+ def read(self, col_names, count):
381
+ print("Python func read", col_names, count, self.cursor)
382
+ if self.cursor >= len(self.data["a"]):
383
+ self.cursor = 0
384
+ return []
385
+ block = [self.data[col] for col in col_names]
386
+ self.cursor += len(block[0])
387
+ return block
388
+
389
+ def get_schema(self):
390
+ return [
391
+ ("a", "int"),
392
+ ("b", "str"),
393
+ ("dict_col", "json")
394
+ ]
395
+
396
+ reader = myReader(
397
+ {
398
+ "a": [1, 2, 3, 4, 5, 6],
399
+ "b": ["tom", "jerry", "auxten", "tom", "jerry", "auxten"],
400
+ "dict_col": [
401
+ {'id': 1, 'tags': ['urgent', 'important'], 'metadata': {'created': '2024-01-01'}},
402
+ {'id': 2, 'tags': ['normal'], 'metadata': {'created': '2024-02-01'}},
403
+ {'id': 3, 'name': 'tom'},
404
+ {'id': 4, 'value': '100'},
405
+ {'id': 5, 'value': 101},
406
+ {'id': 6, 'value': 102}
407
+ ],
408
+ }
409
+ )
410
+
411
+ chdb.query("SELECT b, sum(a) FROM Python(reader) GROUP BY b ORDER BY b").show()
412
+ chdb.query("SELECT dict_col.id FROM Python(reader) WHERE dict_col.value='100'").show()
413
+ ```
414
+
415
+ see also: [test_query_py.py](tests/test_query_py.py) and [test_query_json.py](tests/test_query_json.py).
416
+
417
+ ### JSON Type Inference
418
+
419
+ chDB automatically converts Python dictionary objects to ClickHouse JSON types from these sources:
420
+
421
+ 1. **Pandas DataFrame**
422
+ - Columns with `object` dtype are sampled (default 10,000 rows) to detect JSON structures.
423
+ - Control sampling via SQL settings:
424
+ ```sql
425
+ SET pandas_analyze_sample = 10000 -- Default sampling
426
+ SET pandas_analyze_sample = 0 -- Force String type
427
+ SET pandas_analyze_sample = -1 -- Force JSON type
428
+ ```
429
+ - Columns are converted to `String` if sampling finds non-dictionary values.
430
+
431
+ 2. **Arrow Table**
432
+ - `struct` type columns are automatically mapped to JSON columns.
433
+ - Nested structures preserve type information.
434
+
435
+ 3. **chdb.PyReader**
436
+ - Implement custom schema mapping in `get_schema()`:
437
+ ```python
438
+ def get_schema(self):
439
+ return [
440
+ ("c1", "JSON"), # Explicit JSON mapping
441
+ ("c2", "String")
442
+ ]
443
+ ```
444
+ - Column types declared as "JSON" will bypass auto-detection.
445
+
446
+ When converting Python dictionary objects to JSON columns:
447
+
448
+ 1. **Nested Structures**
449
+ - Recursively process nested dictionaries, lists, tuples and NumPy arrays.
450
+
451
+ 2. **Primitive Types**
452
+ - Automatic type recognition for basic types such as integers, floats, strings, and booleans, and more.
453
+
454
+ 3. **Complex Objects**
455
+ - Non-primitive types will be converted to strings.
456
+
457
+ ### Limitations
458
+
459
+ 1. Column types supported: pandas.Series, pyarrow.array, chdb.PyReader
460
+ 1. Data types supported: Int, UInt, Float, String, Date, DateTime, Decimal
461
+ 1. Python Object type will be converted to String
462
+ 1. Pandas DataFrame performance is all of the best, Arrow Table is better than PyReader
463
+
464
+
465
+ </details>
466
+
467
+ For more examples, see [examples](examples) and [tests](tests).
468
+
469
+ <br>
470
+
471
+ ## Demos and Examples
472
+
473
+ - [Project Documentation](https://clickhouse.com/docs/en/chdb) and [Usage Examples](https://clickhouse.com/docs/en/chdb/install/python)
474
+ - [Colab Notebooks](https://colab.research.google.com/drive/1-zKB6oKfXeptggXi0kUX87iR8ZTSr4P3?usp=sharing) and other [Script Examples](examples)
475
+
476
+ ## Benchmark
477
+
478
+ - [ClickBench of embedded engines](https://benchmark.clickhouse.com/#eyJzeXN0ZW0iOnsiQXRoZW5hIChwYXJ0aXRpb25lZCkiOnRydWUsIkF0aGVuYSAoc2luZ2xlKSI6dHJ1ZSwiQXVyb3JhIGZvciBNeVNRTCI6dHJ1ZSwiQXVyb3JhIGZvciBQb3N0Z3JlU1FMIjp0cnVlLCJCeXRlSG91c2UiOnRydWUsImNoREIiOnRydWUsIkNpdHVzIjp0cnVlLCJjbGlja2hvdXNlLWxvY2FsIChwYXJ0aXRpb25lZCkiOnRydWUsImNsaWNraG91c2UtbG9jYWwgKHNpbmdsZSkiOnRydWUsIkNsaWNrSG91c2UiOnRydWUsIkNsaWNrSG91c2UgKHR1bmVkKSI6dHJ1ZSwiQ2xpY2tIb3VzZ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2x1c3Rlcl9zaXplIjp7IjEiOnRydWUsIjIiOnRydWUsIjQiOnRydWUsIjgiOnRydWUsIjE2Ijp0cnVlLCIzMiI6dHJ1ZSwiNjQiOnRydWUsIjEyOCI6dHJ1ZSwic2VydmVybGVzcyI6dHJ1ZX0sIm1ldHJpYyI6ImhvdCIsInF1ZXJpZXMiOlt0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlXX0=)
483
+
484
+
485
+ <div align="center">
486
+ <img src="https://github.com/chdb-io/chdb/raw/main/docs/_static/df_bench.png" width="800">
487
+ </div>
488
+
489
+
490
+ ## Documentation
491
+ - For chdb specific examples and documentation refer to [chDB docs](https://clickhouse.com/docs/en/chdb)
492
+ - For SQL syntax, please refer to [ClickHouse SQL Reference](https://clickhouse.com/docs/en/sql-reference/syntax)
493
+
494
+
495
+ ## Events
496
+
497
+ - Demo chDB at [ClickHouse v23.7 livehouse!](https://t.co/todc13Kn19) and [Slides](https://docs.google.com/presentation/d/1ikqjOlimRa7QAg588TAB_Fna-Tad2WMg7_4AgnbQbFA/edit?usp=sharing)
498
+
499
+ ## Contributing
500
+ 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**.
501
+ There are something you can help:
502
+ - [ ] Help test and report bugs
503
+ - [ ] Help improve documentation
504
+ - [ ] Help improve code quality and performance
505
+
506
+ ### Bindings
507
+
508
+ We welcome bindings for other languages, please refer to [bindings](bindings.md) for more details.
509
+
510
+ ## Paper
511
+
512
+ - [ClickHouse - Lightning Fast Analytics for Everyone](https://www.vldb.org/pvldb/vol17/p3731-schulze.pdf)
513
+
514
+ ## License
515
+ Apache 2.0, see [LICENSE](LICENSE.txt) for more information.
516
+
517
+ ## Acknowledgments
518
+ chDB is mainly based on [ClickHouse](https://github.com/ClickHouse/ClickHouse) [^1]
519
+ for trade mark and other reasons, I named it chDB.
520
+
521
+ ## Contact
522
+ - Discord: [https://discord.gg/D2Daa2fM5K](https://discord.gg/D2Daa2fM5K)
523
+ - Email: auxten@clickhouse.com
524
+ - Twitter: [@chdb](https://twitter.com/chdb_io)
525
+
526
+
527
+ <br>
528
+
529
+ [^1]: ClickHouse® is a trademark of ClickHouse Inc. All trademarks, service marks, and logos mentioned or depicted are the property of their respective owners. The use of any third-party trademarks, brand names, product names, and company names does not imply endorsement, affiliation, or association with the respective owners.
@@ -0,0 +1,28 @@
1
+ chdb/__init__.py,sha256=pNYyLRqm2s5hG1rPhVLECZXvJQ60EGPt_OC88W90j0w,3762
2
+ chdb/__main__.py,sha256=xNNtDY38d973YM5dlxiIazcqqKhXJSpNb7JflyyrXGE,1185
3
+ chdb/_chdb.cpython-38-darwin.so,sha256=ALptHppGM0rBkF5bl_5Ma_tC8pX7mpTHm68BWhm5pnE,383541008
4
+ chdb/rwabc.py,sha256=tbiwCrXirfrfx46wCJxS64yvFe6pVWIPGdSuvrAL5Ys,2102
5
+ chdb/dataframe/__init__.py,sha256=1_mrZZiJwqBTnH_P8_FCbbYXIWWY5sxnaFpe3-tDLF4,680
6
+ chdb/dataframe/query.py,sha256=ggvE8A5vtabFg9gSTp99S7LCrnIEwbWtb-PtJVT8Ct0,12759
7
+ chdb/dbapi/__init__.py,sha256=aaNhxXNBC1ZkFr260cbGR8msOinTp0VoNTT_j8AXGUc,2205
8
+ chdb/dbapi/connections.py,sha256=RW0EcusyKueMGp7VmSaCO-ukyzY7l2ps_ibA9-pXDvo,2754
9
+ chdb/dbapi/converters.py,sha256=0SDqgixUTCz0LtWke_HHzgF1lFJhpsQrR_-ky3b-JRY,7447
10
+ chdb/dbapi/cursors.py,sha256=3ufVB1zt3x7SzCYowVbwAOsuzkMxYPO74q9XW6ctkKo,8120
11
+ chdb/dbapi/err.py,sha256=kUI9-A8LNqBoMoo4jh2NFsLCOLoPEwh9YIuz_qMoLoM,2017
12
+ chdb/dbapi/times.py,sha256=_qXgDaYwsHntvpIKSKXp1rrYIgtq6Z9pLyLnO2XNoL0,360
13
+ chdb/dbapi/constants/FIELD_TYPE.py,sha256=ytFzgAnGmb9hvdsBlnK68qdZv_a6jYFIXT6VSAb60z8,370
14
+ chdb/dbapi/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ chdb/session/__init__.py,sha256=fCUROZ5L1-92o2lcASiWJpFu-80-kDoSrNfouLEmLg8,50
16
+ chdb/session/state.py,sha256=m7K9zZtoMQTlh-pfmSyJV38pAe6eHNTPtOvlHYrImhA,4436
17
+ chdb/state/__init__.py,sha256=RVUIWDqDi7gte4Os7Mz1wPXFyFpdHT_p1klJC7QtluI,55
18
+ chdb/state/sqlitelike.py,sha256=v0xh9jWirHzhDVq26C2213LxfaDbRulSAhSHaTiZ24c,12283
19
+ chdb/udf/__init__.py,sha256=qSMaPEre7w1pYz8uJ-iZtuu8wYOUNRcI_8UNuaOymGE,80
20
+ chdb/udf/udf.py,sha256=z0A1RmyZrx55bykpvvS-LpVt1lMrQOexjvU5zxCdCSA,3935
21
+ chdb/utils/__init__.py,sha256=tXRcwBRGW2YQNBZWV4Mitw5QlCu_qlSRCjllw15XHbs,171
22
+ chdb/utils/trace.py,sha256=W-pvDoKlnzq6H_7FiWjr5_teN40UNE4E5--zbUrjOIc,2511
23
+ chdb/utils/types.py,sha256=MGLFIjoDvu7Uc2Wy8EDY60jjue66HmMPxbhrujjrZxQ,7530
24
+ chdb-3.4.0.dist-info/LICENSE.txt,sha256=isYVtNCO5910aj6e9bJJ6kQceivkLqsMlFSNYwzGGKI,11366
25
+ chdb-3.4.0.dist-info/METADATA,sha256=niEMQj5RD1T34yBzfkJzW9K4gziEvAnITAuzNN10AIs,24622
26
+ chdb-3.4.0.dist-info/WHEEL,sha256=9FabR3Kab7Nb3lO5nBQWtZc544XJ0hYCmiQC2RH2bHM,107
27
+ chdb-3.4.0.dist-info/top_level.txt,sha256=se0Jj0A2-ijfMW51hIjiuNyDJPqy5xJU1G8a_IEdllI,11
28
+ chdb-3.4.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (75.3.2)
3
+ Root-Is-Purelib: false
4
+ Tag: cp38-cp38-macosx_11_0_arm64
5
+
@@ -0,0 +1,2 @@
1
+ _chdb
2
+ chdb