streamsync


Namestreamsync JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://www.streamsync.cloud
SummaryStreamsync helps you create performant data apps, via Python code and its built-in visual UI editor.
upload_time2024-04-23 17:05:45
maintainerNone
docs_urlNone
authorRamiro Medina
requires_python<4.0,>=3.9.2
licenseApache 2.0
keywords data apps gui ui
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## What is Streamsync?

[![PyPi](https://img.shields.io/pypi/v/streamsync.svg?label=Version)](https://pypi.org/project/streamsync/)
[![CI](https://github.com/streamsync-cloud/streamsync/actions/workflows/ci.yml/badge.svg)](https://github.com/streamsync-cloud/streamsync/actions/workflows/ci.yml) 
[![Discord](https://img.shields.io/badge/discord-streamsync-sn677E3Pd3?logo=discord&logoColor=white)](https://discord.gg/sn677E3Pd3)
[![License](https://img.shields.io/pypi/l/streamsync)](LICENSE)

Streamsync is an open-source framework for creating data apps. Build user interfaces using a visual editor; write the backend code in Python. 

![Streamsync Builder screenshot](https://raw.githubusercontent.com/streamsync-cloud/streamsync/master/docs/docs/public/sc1.png "Streamsync Builder screenshot")

- [Live demo](https://hello.streamsync.cloud/) of an app. [Source code](https://github.com/streamsync-cloud/streamsync/blob/master/apps/hello/main.py).
- [1 minute introduction video](https://youtu.be/XBAPBy_zf8s) on YouTube

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

### Reactive and state-driven

Streamsync is **fully state-driven** and provides **separation of concerns** between user interface and business logic. 

```py
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`.

### 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.

### 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](https://medium.com/@ramiromedina/measuring-time-elapsed-between-an-event-and-its-associated-dom-mutation-80431ad576e1).

### 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.

## Installation and Quickstart

Getting started with Streamsync is easy. It works on Linux, Mac and Windows.

```sh
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.

```sh
streamsync create my_app
streamsync edit my_app
streamsync run my_app
```

## Documentation

Documentation is available online at [streamsync.cloud](https://streamsync.cloud).

## License

This project is licensed under the Apache 2.0 License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.streamsync.cloud",
    "name": "streamsync",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9.2",
    "maintainer_email": null,
    "keywords": "data apps, gui, ui",
    "author": "Ramiro Medina",
    "author_email": "ramiro.a.medina@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f7/0c/a17ee26fbd601b24d4fb2015c3bfe82f44d29b17cb45c4780562054150ab/streamsync-0.5.0.tar.gz",
    "platform": null,
    "description": "## What is Streamsync?\n\n[![PyPi](https://img.shields.io/pypi/v/streamsync.svg?label=Version)](https://pypi.org/project/streamsync/)\n[![CI](https://github.com/streamsync-cloud/streamsync/actions/workflows/ci.yml/badge.svg)](https://github.com/streamsync-cloud/streamsync/actions/workflows/ci.yml) \n[![Discord](https://img.shields.io/badge/discord-streamsync-sn677E3Pd3?logo=discord&logoColor=white)](https://discord.gg/sn677E3Pd3)\n[![License](https://img.shields.io/pypi/l/streamsync)](LICENSE)\n\nStreamsync is an open-source framework for creating data apps. Build user interfaces using a visual editor; write the backend code in Python. \n\n![Streamsync Builder screenshot](https://raw.githubusercontent.com/streamsync-cloud/streamsync/master/docs/docs/public/sc1.png \"Streamsync Builder screenshot\")\n\n- [Live demo](https://hello.streamsync.cloud/) of an app. [Source code](https://github.com/streamsync-cloud/streamsync/blob/master/apps/hello/main.py).\n- [1 minute introduction video](https://youtu.be/XBAPBy_zf8s) on YouTube\n\nIt's an alternative to Plotly Dash, Streamlit and Gradio. Its focused on the creation of web applications for data analytics and machine learning.\n\nIt 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.\n\n## Highlights\n\n### Reactive and state-driven\n\nStreamsync is **fully state-driven** and provides **separation of concerns** between user interface and business logic. \n\n```py\nimport streamsync as ss\n\ndef handle_increment(state):\n    state[\"counter\"] += 1\n\nss.init_state({\n    \"counter\": 0\n})\n```\n\nThe 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`.\n\n### Flexible\n- Elements are highly customisable with no CSS required, allowing for shadows, button icons, background colours, etc.\n- HTML elements with custom CSS can be included using the _HTML Element_ component. They can serve as containers for built-in components.\n\n### Fast\n- Event handling adds minimal overhead to your Python code (~1-2ms*).\n- Streaming (WebSockets) is used to synchronise frontend and backend states.\n- The script only runs once.\n- Non-blocking by default. Events are handled asynchronously in a thread pool running in a dedicated process.\n\n*End-to-end figure, including DOM mutation. Tested locally on a Macbook Air M2. [Measurement methodology](https://medium.com/@ramiromedina/measuring-time-elapsed-between-an-event-and-its-associated-dom-mutation-80431ad576e1).\n\n### Developer-friendly\n- It's all contained in a standard Python package, just one `pip install` away.\n- User interfaces are saved as JSON, so they can be version controlled together with the rest of the application.\n- Use your local code editor and get instant refreshes when you save your code. Alternatively, use the provided web-based editor.\n- You edit the UI while your app is running. No hitting \"Preview\" and seeing something completely different to what you expected.\n\n## Installation and Quickstart\n\nGetting started with Streamsync is easy. It works on Linux, Mac and Windows.\n\n```sh\npip install \"streamsync[ds]\"\nstreamsync hello\n```\n\n- The first command will install Streamsync using `pip` and include the optional data science dependencies.\n- 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.\n\nThe following commands can be used to create, launch Streamsync Builder and run an application.\n\n```sh\nstreamsync create my_app\nstreamsync edit my_app\nstreamsync run my_app\n```\n\n## Documentation\n\nDocumentation is available online at [streamsync.cloud](https://streamsync.cloud).\n\n## License\n\nThis project is licensed under the Apache 2.0 License.\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Streamsync helps you create performant data apps, via Python code and its built-in visual UI editor.",
    "version": "0.5.0",
    "project_urls": {
        "Documentation": "https://www.streamsync.cloud/getting-started.html",
        "Homepage": "https://www.streamsync.cloud",
        "Repository": "https://www.github.com/streamsync-cloud/streamsync"
    },
    "split_keywords": [
        "data apps",
        " gui",
        " ui"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4a620696d2a22034218e77875dc2fa3d4bf7a4414942a709fccc57cda489f383",
                "md5": "195864446897bd4b53e7e6b56a638b36",
                "sha256": "50531cfb3109a66b3757577a33319303055634074ec67502961484419901d76e"
            },
            "downloads": -1,
            "filename": "streamsync-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "195864446897bd4b53e7e6b56a638b36",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9.2",
            "size": 7635375,
            "upload_time": "2024-04-23T17:05:43",
            "upload_time_iso_8601": "2024-04-23T17:05:43.966046Z",
            "url": "https://files.pythonhosted.org/packages/4a/62/0696d2a22034218e77875dc2fa3d4bf7a4414942a709fccc57cda489f383/streamsync-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f70ca17ee26fbd601b24d4fb2015c3bfe82f44d29b17cb45c4780562054150ab",
                "md5": "752beb76c1a658b18b42b1719aa1f928",
                "sha256": "e820228ab7934a2c805ac2287970e664e76ee1b8d24a70bb3603455d929a0ddb"
            },
            "downloads": -1,
            "filename": "streamsync-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "752beb76c1a658b18b42b1719aa1f928",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9.2",
            "size": 7563000,
            "upload_time": "2024-04-23T17:05:45",
            "upload_time_iso_8601": "2024-04-23T17:05:45.795196Z",
            "url": "https://files.pythonhosted.org/packages/f7/0c/a17ee26fbd601b24d4fb2015c3bfe82f44d29b17cb45c4780562054150ab/streamsync-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-23 17:05:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "streamsync-cloud",
    "github_project": "streamsync",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "streamsync"
}
        
Elapsed time: 0.27115s