Skip to main content

High-Level Abstraction Web-GUI Using Just Python

Project description


We like Streamlit but find it does too 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".


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.


  • 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


python3 -m pip install nicegui


Write your nice GUI in a file

from nicegui import ui

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

Launch it with:


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


You can call with optional arguments for some high-level configuration:

  • host (default: '')
  • port (default: 80)
  • title (default: 'NiceGUI')
  • favicon (default: 'favicon.ico')
  • reload: automatically reload the ui on file changes (default: True)
  • show: automatically open the ui in a browser tab (default: True)


Use the multi-arch docker image for pain-free installation:

docker run --rm -p 8888:80 -v $(pwd)/ -it zauberzeug/nicegui:latest

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


The API reference is hosted at and is implemented with NiceGUI itself. You should also have a look at for an extensive demonstration of what you can do with NiceGUI.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nicegui, version 0.4.13
Filename, size File type Python version Upload date Hashes
Filename, size nicegui-0.4.13-py3-none-any.whl (4.5 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size nicegui-0.4.13.tar.gz (4.4 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page