# Install via pip (requires Python >= 3.9.2)
pip install "streamsync[ds]"
# Run local server for the demo app
streamsync hello
# Install via pip (requires Python >= 3.9.2)
pip install "streamsync[ds]"
# Run local server for the demo app
streamsync hello
Streamsync is fully state-driven and provides separation of concerns between user interface and business logic.
import streamsync as ss
def handle_increment(state):
state["counter"] += 1
ss.init_state({
"counter": 0
})
import streamsync as ss
def handle_increment(state):
state["counter"] += 1
ss.init_state({
"counter": 0
})
The user interface is a template, which is defined visually. The template contains reactive references to state, e.g. @{counter}
, and references to event handlers, e.g. when Button is clicked, trigger handle_increment
.