PythonNiceGUIWebFastAPI

NiceGUI: build a web application in Python without writing JavaScript

Published on 2026-07-05 · Xiliux

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?

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.

FAQ

Does NiceGUI require knowing JavaScript?

Not to get started: you write Python and NiceGUI generates the interface in the browser. You'd only drop down to JS for something very specific that the framework doesn't cover; the bulk of an internal app, dashboard, or MVP is done in pure Python.

What is NiceGUI ideal for and what is it not?

Ideal: MVPs, dashboards, internal tools — where you want to iterate fast in Python. Less ideal: sites whose goal is SEO/organic traffic, because it renders on the client over WebSocket and the crawler doesn't see the content; for that, server-side HTML.

How is the interface structured?

With context managers (`with ui.card(): ...`) that reflect how the elements nest: the hierarchy of the code IS the visual hierarchy. State lives on the server and NiceGUI synchronises it with the browser for you.

What is it built on?

On FastAPI (the backend) and Quasar/Vue (the browser components). You don't touch either directly: you write Python and NiceGUI acts as the bridge.

← More articlesRequest a quote