NiceGUI lets you build web UIs in pure Python with buttons, charts, maps, and dialogs, served to a browser or native window.
Overview
NiceGUI is a Python UI toolkit that renders interactive pages in the user’s browser while keeping application logic on the server. You declare labels, inputs, tables, charts, 3D scenes, maps, media, and layout primitives in Python; the framework bridges them to a Vue and Quasar frontend over FastAPI, Starlette, and Uvicorn with socket.io updates.
It can run as a normal web server accessed at a local port or in native mode that opens a desktop window. Code changes trigger automatic page reload during development. Built-in timers, data binding, refreshable functions, notifications, dialogs, routing, persistence, and multi-page patterns support dashboards, robotics tools, smart-home panels, and small internal apps without writing HTML, CSS, or JavaScript.
Styling uses Tailwind CSS and Quasar theming, including dark mode and custom accent colors. Distribution options include PyPI, conda-forge, Docker images, and running the project’s own documentation site locally via Docker. A pytest-based testing helpers ship with the package.
Architecturally, NiceGUI keeps a single async worker, batches UI diffs through an outbox, and routes UI events back into Python callables over a persistent WebSocket after the initial page load.
Key features
- Pure Python UI definition
- FastAPI and Vue/Quasar stack
- Charts, maps, and 3D scenes
- Auto reload on code edits
- Native window or browser mode
- Multi-page routing support
- Dark mode and theming
- Docker and PyPI distribution
Use cases
- Internal dashboards
- Robotics control panels
- ML tuning interfaces
- Smart home dashboards
- Quick micro web apps