You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-3Lines changed: 32 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,37 @@
1
-
# BoilingData WebSocket Client for Python
1
+
# BoilingData Client for Python
2
2
3
-
Simple client to send SQL queries and receive results from BoilingData WebSockets API.
3
+
A python client for sending SQL queries and receive results from BoilingData WebSockets API.
4
4
5
-
For example usage, please see [tests/test_connection.py](tests/test_connection.py).
5
+
- This package uses `asyncio` and `threads` to make the `websocket.WebSocketApp()` run on the background.
6
+
- For example usage, please see tests and [main.py](main.py). You can run the main.py with `make run`.
7
+
-[`DataQueue class`](py_boilingdata/data_queue.py) is used for book keeping all incoming `DATA` messages and when all pieces are in place, order them and pass back via callback function.
8
+
9
+
> **NOTE:** This package is considered experimental. Feel free to suggest improvements, especially on how to make this module easy to use.
10
+
11
+
```python
12
+
import asyncio
13
+
from pprint import pprint
14
+
from py_boilingdata import BoilingData
15
+
16
+
17
+
asyncdefmain():
18
+
boiling = BoilingData()
19
+
await boiling.connect()
20
+
await boiling.populate()
21
+
22
+
defcb(resp):
23
+
pprint(resp)
24
+
25
+
q ="SELECT first_name, email FROM parquet_scan('s3://boilingdata-demo/test.parquet') LIMIT 10"
26
+
await boiling.execute(q, cb)
27
+
await asyncio.sleep(10) # There is no way to await for the cb call..
0 commit comments