Streamsync helps you create performant data apps, via Python code and its built-in visual UI editor.
Project description
What is Streamsync?
Streamsync is an open-source framework for creating data apps. Build user interfaces using a visual editor; write the backend code in Python. Check out a live demo of an app.
It's an alternative to Plotly Dash, Streamlit and Gradio. Its focused on the creation of web applications for data analytics and machine learning.
It aims to be as simple as Streamlit, but faster, more flexible and with a cleaner, easily-testable syntax. It provides separation of concerns between UI and business logic, enabling more complex applications.
Highlights
Simple
Event handlers are defined as plain, easily-testable Python functions.
def handle_increment(state):
state["counter"] += 1
ss.init_state({
"counter": 0
})
The event handler and state are linked to the UI using Streamsync Builder, the framework's visual editor.
Developer-friendly
- It's all contained in a standard Python package, just one
pip install
away. - User interfaces are saved as JSON, so they can be version controlled together with the rest of the application.
- Use your local code editor and get instant refreshes when you save your code. Alternatively, use the provided web-based editor.
- You edit the UI while your app is running. No hitting "Preview" and seeing something completely different to what you expected.
Fast
- Event handling adds minimal overhead to your Python code (~1-2ms*).
- Streaming (WebSockets) is used to synchronise frontend and backend states.
- The script only runs once.
- Non-blocking by default. Events are handled asynchronously in a thread pool running in a dedicated process.
*End-to-end figure, including DOM mutation. Tested locally on a Macbook Air M2. Measurement methodology.
Flexible
- Elements are highly customisable with no CSS required, allowing for shadows, button icons, background colours, etc.
- HTML elements with custom CSS can be included using the HTML Element component. They can serve as containers for built-in components.
Installation and Quickstart
Getting started with Streamsync is easy. It works on Linux, Mac and Windows.
pip install "streamsync[ds]"
streamsync hello
- The first command will install Streamsync using
pip
and include the optional data science dependencies. - The second command will create a demo application in the subfolder "hello" and start Streamsync Builder, the framework's visual editor, which will be accessible via a local URL.
The following commands can be used to create, launch Streamsync Builder and run an application.
streamsync create my_app
streamsync edit my_app
streamsync run my_app
Documentation
Documentation is available online at streamsync.cloud.
License
This project is licensed under the Apache 2.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for streamsync-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67194f7af2e75878269d56713710c105ad4b6dde56f86dba6640672b0dbf55f3 |
|
MD5 | c5711cdb216ac75b17e3fde60cc47fff |
|
BLAKE2b-256 | fb68429ee743cca2126bb4bab4594dd66ac432aced784ce9d9ff71a0e3bd4fc1 |