Skip to main content

High-Level Abstraction Web-GUI Using Just Python

Project description

NiceGUI

We like Streamlit but find it does to much magic when it comes to state handling. In search for an alernative nice library to write simple graphical user interfaces in Python we discovered justpy. 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 user interfaces with a very limited user base. Custom "Smart-Home Control" solutions or "Robotics" for example. It's also helpful for development like tweaking/configuring a machine learning training or tuning motor controllers.

Features

  • browser-based GUI
  • 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
  • genral-purpose html and markdown elements
  • built-in timer to refresh data in intervals (even every 10 ms)
  • straight-forward data bindings to write even less code

Install

python3 -m pip install nicegui

Usage

Write your nice GUI in a file main.py:

from nicegui import ui

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

Launch it with:

python3 main.py

Note: The script will automatically reload the GUI if you modify your code.

API

The API reference is hosted at https://nicegui.io. Also have a look at examples.py for an extensive demonstration of what you can do with NiceGUI.

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

nicegui-0.2.2.tar.gz (17.9 kB view hashes)

Uploaded Source

Built Distribution

nicegui-0.2.2-py3-none-any.whl (24.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page