nicegui


Namenicegui JSON
Version 0.3.2 PyPI version JSON
download
home_pagehttps://github.com/zauberzeug/nicegui
SummaryHigh-Level Abstraction Web-GUI Using Just Python
upload_time2021-06-15 04:56:32
maintainer
docs_urlNone
authorZauberzeug GmbH
requires_python>=3.7,<4.0
licenseMIT
keywords gui ui web interface live
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # NiceGUI

<img src="https://raw.githubusercontent.com/zauberzeug/nicegui/main/sceenshots/ui-elements.png" width="300" align="right">

We like [Streamlit](https://streamlit.io/) but find it does [too much magic when it comes to state handling](https://github.com/zauberzeug/nicegui/issues/1#issuecomment-847413651).
In search for an alernative nice library to write simple graphical user interfaces in Python we discovered [justpy](https://justpy.io/).
While too "low-level HTML" for our daily usage it provides a great basis for "NiceGUI".

## Purpose

NiceGUI is intended to be used for small scripts and single-page user interfaces with a very limited user base.
Like smart home solutions, micro web apps or robotics projects.
It's also helpful for development, when tweaking/configuring a machine learning training or tuning motor controllers.

## Features

- browser-based graphical user interface
- shared state between multiple browser windows
- implicit reload on code change
- clean set of GUI elements (label, button, checkbox, switch, slider, input, ...)
- simple grouping with rows, columns and cards
- general-purpose HTML and markdown elements
- built-in timer to refresh data in intervals (even every 10 ms)
- straight-forward data binding to write even less code

## Installation

```bash
python3 -m pip install nicegui
```

## Usage

Write your nice GUI in a file `main.py`:

```python
from nicegui import ui

ui.label('Hello NiceGUI!')
ui.button('BUTTON', on_click=lambda: print('button was pressed', flush=True))
```

Launch it with:

```bash
python3 main.py
```

The GUI is now avaliable through http://localhost/ in your browser.
Note: The script will automatically reload the page when you modify the code.

## Docker

Use the [multi-arch docker image](https://hub.docker.com/repository/docker/zauberzeug/nicegui) for pain-free installation:

```bash
docker run --rm -p 8888:80 -v $(pwd)/my_script.py:/app/main.py -it zauberzeug/nicegui:latest
```

This will start the server at http://localhost:8888 with code from `my_script.py` within the current directory.
Code modification triggers an automatic reload.

## API

The API reference is hosted at [https://nicegui.io](https://nicegui.io) and is [implemented with NiceGUI itself](https://github.com/zauberzeug/nicegui/blob/main/main.py).
You should also have a look at [examples.py](https://github.com/zauberzeug/nicegui/tree/main/examples.py) for an extensive demonstration of what you can do with NiceGUI.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zauberzeug/nicegui",
    "name": "nicegui",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "gui,ui,web,interface,live",
    "author": "Zauberzeug GmbH",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/4a/a9/4a2221b34723e336f31ef1862463fbe67deae64717e416a5b342db44848d/nicegui-0.3.2.tar.gz",
    "platform": "",
    "description": "# NiceGUI\n\n<img src=\"https://raw.githubusercontent.com/zauberzeug/nicegui/main/sceenshots/ui-elements.png\" width=\"300\" align=\"right\">\n\nWe like [Streamlit](https://streamlit.io/) but find it does [too much magic when it comes to state handling](https://github.com/zauberzeug/nicegui/issues/1#issuecomment-847413651).\nIn search for an alernative nice library to write simple graphical user interfaces in Python we discovered [justpy](https://justpy.io/).\nWhile too \"low-level HTML\" for our daily usage it provides a great basis for \"NiceGUI\".\n\n## Purpose\n\nNiceGUI is intended to be used for small scripts and single-page user interfaces with a very limited user base.\nLike smart home solutions, micro web apps or robotics projects.\nIt's also helpful for development, when tweaking/configuring a machine learning training or tuning motor controllers.\n\n## Features\n\n- browser-based graphical user interface\n- shared state between multiple browser windows\n- implicit reload on code change\n- clean set of GUI elements (label, button, checkbox, switch, slider, input, ...)\n- simple grouping with rows, columns and cards\n- general-purpose HTML and markdown elements\n- built-in timer to refresh data in intervals (even every 10 ms)\n- straight-forward data binding to write even less code\n\n## Installation\n\n```bash\npython3 -m pip install nicegui\n```\n\n## Usage\n\nWrite your nice GUI in a file `main.py`:\n\n```python\nfrom nicegui import ui\n\nui.label('Hello NiceGUI!')\nui.button('BUTTON', on_click=lambda: print('button was pressed', flush=True))\n```\n\nLaunch it with:\n\n```bash\npython3 main.py\n```\n\nThe GUI is now avaliable through http://localhost/ in your browser.\nNote: The script will automatically reload the page when you modify the code.\n\n## Docker\n\nUse the [multi-arch docker image](https://hub.docker.com/repository/docker/zauberzeug/nicegui) for pain-free installation:\n\n```bash\ndocker run --rm -p 8888:80 -v $(pwd)/my_script.py:/app/main.py -it zauberzeug/nicegui:latest\n```\n\nThis will start the server at http://localhost:8888 with code from `my_script.py` within the current directory.\nCode modification triggers an automatic reload.\n\n## API\n\nThe API reference is hosted at [https://nicegui.io](https://nicegui.io) and is [implemented with NiceGUI itself](https://github.com/zauberzeug/nicegui/blob/main/main.py).\nYou should also have a look at [examples.py](https://github.com/zauberzeug/nicegui/tree/main/examples.py) for an extensive demonstration of what you can do with NiceGUI.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "High-Level Abstraction Web-GUI Using Just Python",
    "version": "0.3.2",
    "split_keywords": [
        "gui",
        "ui",
        "web",
        "interface",
        "live"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "374b55e38dff8156df0fb51f52de8a95",
                "sha256": "bf4728813b7a9dd92c97f9d28d95278cff54ec05380461139bfb70c70db29983"
            },
            "downloads": -1,
            "filename": "nicegui-0.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "374b55e38dff8156df0fb51f52de8a95",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 4448128,
            "upload_time": "2021-06-15T04:56:30",
            "upload_time_iso_8601": "2021-06-15T04:56:30.339788Z",
            "url": "https://files.pythonhosted.org/packages/d0/32/d45c019df726aa7037f627576e585029070abd05c56c045e1f89744966e8/nicegui-0.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "17babe8c2f41b5247996b1bafa3f54f0",
                "sha256": "db267ea398d6e7f6de2c4e6e43feca4509236328c3aaa611c8f9e4e93239cf12"
            },
            "downloads": -1,
            "filename": "nicegui-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "17babe8c2f41b5247996b1bafa3f54f0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 4408508,
            "upload_time": "2021-06-15T04:56:32",
            "upload_time_iso_8601": "2021-06-15T04:56:32.538042Z",
            "url": "https://files.pythonhosted.org/packages/4a/a9/4a2221b34723e336f31ef1862463fbe67deae64717e416a5b342db44848d/nicegui-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-06-15 04:56:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "zauberzeug",
    "error": "Could not fetch GitHub repository",
    "lcname": "nicegui"
}
        
Elapsed time: 0.39358s