nicegui
Create web-based user interfaces with Python. The nice way.
NiceGUI lets you build web-based user interfaces entirely in Python, no HTML, CSS, or JavaScript needed. Write Python code for buttons, charts, and dialogs, and they appear in the browser instantly.
NiceGUI is a Python framework for building user interfaces that show up in a web browser. Instead of designing HTML pages or wiring up a separate JavaScript frontend, you write Python code that describes the buttons, labels, sliders, dialogs, charts, and so on, and NiceGUI takes care of rendering them in the browser and shuttling clicks and inputs back to your Python code. The tagline is "create web-based user interfaces with Python — the nice way."
A minimal example from the README is just a few lines: import ui from nicegui, call ui.label and ui.button, then ui.run(); launch it with python3 main.py and the interface is reachable at http://localhost:8080/. It also reloads automatically when you change the code. You install it with pip install nicegui, and it is also available as a Docker image and on conda-forge.
The framework is aimed at micro web apps, dashboards, robotics projects, smart home setups, and similar use cases, plus developer tools — for example, tweaking a machine learning algorithm or tuning motor controllers while watching live values. Beyond standard widgets, it can plot graphs and charts, render 3D scenes, accept input from virtual joysticks, annotate images, show tables and tree structures, embed audio and video, and refresh data on a timer as fast as every 10 ms. It runs in Jupyter Notebooks, supports data binding, shared and per-user pages, persistence, custom routes, global keyboard shortcuts, and theming.
Under the hood, the README says NiceGUI is built on FastAPI, Starlette, and Uvicorn for the server side, with Vue and Quasar handling the browser side. The full README is longer than what was provided.
Where it fits
- Build a live dashboard for a robotics or smart home project using Python sliders and charts refreshed as fast as every 10 ms.
- Create a web UI for tweaking machine learning parameters and watching live results without learning JavaScript.
- Add a quick settings screen or admin panel to an existing Python backend in just a few lines of code.
- Prototype micro web apps or developer tools that run locally and reload automatically on code changes.