If you know Python but the frontend holds you back, NiceGUI is one of the best pieces of news of recent years: it lets you build complete web applications —with buttons, forms, charts, and navigation— using only Python.
What is NiceGUI?
It's a framework built on top of FastAPI (backend) and Quasar/Vue (frontend). You write Python; NiceGUI generates the interface in the browser and keeps the state synchronised for you. You don't need HTML, CSS, or JavaScript to get started.
How simple it is
An app with a button that shows a message is literally four lines:
from nicegui import ui
ui.button('Greet', on_click=lambda: ui.notify('Hello!'))
ui.run()
The hierarchy of the interface is expressed with context managers, which reflect how the elements nest:
with ui.card():
ui.label('Sign in').classes('text-xl font-bold')
user = ui.input('User')
password = ui.input('Password', password=True)
ui.button('Enter', on_click=lambda: sign_in(user.value, password.value))
Adding reactive state, forms, tables, or routes (@ui.page('/panel')) is just as direct.
What is it ideal for?
- MVPs and prototypes: validate an idea in days, not weeks.
- Dashboards — internal ones and data panels.
- Internal tools for your team, without setting up a separate frontend.
- Demos of AI models or scripts that need an interface.
When is it NOT the best option?
NiceGUI renders on the client, so for sites where the content's SEO is critical (a blog, a public landing page that has to rank) it's worth complementing it with good meta tags and structured data, or considering server-side rendering. For applications, dashboards, and internal tools it's an excellent and highly productive choice.
Performance and deployment
A NiceGUI app is deployed like any FastAPI/Uvicorn app, usually behind nginx with systemd. Serve the static files from nginx and use ui.run(show=False) in production so as not to open a browser on the server.
Want an app like this?
This very portfolio is built with NiceGUI. If you need an MVP, a dashboard, or an internal tool in Python, write to me.
Need something like this built? At Xiliux we build custom MVPs and tools in Python and Rust. See our services.
Xiliux