Skip to content

Commit cbccae7

Browse files
committed
move demo.py to examples/
Signed-off-by: Bugen Zhao <[email protected]>
1 parent 301df04 commit cbccae7

File tree

6 files changed

+11
-4
lines changed

6 files changed

+11
-4
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
Simple Python SDK for event-driven applications with RisingWave.
44

5+
56
## Quick start
67

78
### 1. Install risingwave-py ([PyPI](https://pypi.org/project/risingwave-py/))
@@ -124,6 +125,11 @@ rw.insert(table_name="test_product", data=test_df3)
124125

125126
## Demo
126127
You can also check the demo in our [repo](https://github.com/risingwavelabs/risingwave-py).
128+
127129
```shell
128-
uv run demo.py simple
130+
# Run the simple demo
131+
uv run examples/demo.py simple
132+
133+
# Run the Binance demo
134+
uv run examples/demo.py boll
129135
```

examples/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# This file is intentionally left empty to make the directory a Python package
File renamed without changes.
File renamed without changes.

demo.py renamed to examples/demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def subscribe_tick_analytics():
130130

131131

132132
def demo_boll():
133-
import binance
133+
from examples.binance import subscribe_bars
134134

135135
from datetime import datetime
136136
from risingwave import RisingWave
@@ -171,7 +171,7 @@ def handle_binance_klines_update(data):
171171
)
172172

173173
def subscribe_binance():
174-
binance.subscribe_bars(
174+
subscribe_bars(
175175
streams=["ethusdt@kline_1m", "ethusdt@kline_5m", "ethusdt@kline_15m"],
176176
handler=handle_binance_klines_update,
177177
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["hatchling"]
33
build-backend = "hatchling.build"
44

55
[tool.hatch.build.targets.sdist]
6-
exclude = ["/.git", "/venv", "/.venv", "/binance"]
6+
exclude = ["/.git", "/venv", "/.venv", "/examples"]
77

88

99
[tool.hatch.build.targets.wheel]

0 commit comments

Comments
 (0)