nicegui README

The project's README from github.com/zauberzeug/nicegui. As one markdown file: README.md.

Try online!

NiceGUI

NiceGUI is an easy-to-use, Python-based UI framework, which shows up in your web browser. You can create buttons, dialogs, Markdown, 3D scenes, plots and much more.

It is great for micro web apps, dashboards, robotics projects, smart home solutions and similar use cases. You can also use it in development, for example when tweaking/configuring a machine learning algorithm or tuning motor controllers.

NiceGUI is available as PyPI package, Docker image and on conda-forge as well as GitHub.

PyPI PyPI downloads Conda version Conda downloads Docker pulls
GitHub license GitHub commit activity GitHub issues GitHub forks GitHub stars DOI

Features

Installation

python3 -m pip install nicegui

Usage

Write your nice GUI in a file main.py:

from nicegui import ui

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

ui.run()

Launch it with:

python3 main.py

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

Documentation and Examples

The documentation is hosted at https://nicegui.io/documentation and provides plenty of live demos. The whole content of https://nicegui.io is implemented with NiceGUI itself and can be started locally with docker run -p 8080:8080 zauberzeug/nicegui or by executing main.py from this repository.

You may also have a look at our in-depth examples of what you can do with NiceGUI. In our wiki we have a list of great NiceGUI projects from the community, a section with Tutorials and a growing list of FAQs. When building NiceGUI projects with AI assistants, point them at nicegui/llms.md — a concise reference that ships with the package (also served at https://nicegui.io/llms.txt).

Why?

We at Zauberzeug like Streamlit but find it does too much magic when it comes to state handling. In search for an alternative nice library to write simple graphical user interfaces in Python we discovered JustPy. Although we liked the approach, it is too "low-level HTML" for our daily usage. But it inspired us to use Vue and Quasar for the frontend.

We have built on top of FastAPI, which itself is based on the ASGI framework Starlette and the ASGI webserver Uvicorn because of their great performance and ease of use.

Sponsors

Maintenance of this project is made possible by all the contributors and sponsors. If you would like to support this project and have your avatar or company logo appear below, please sponsor us. 💖

Lechler GmbH Zhifeng Wayne Houlden DigiQuip AS JACOB SHI TestMu AI Open Source Office (Formerly LambdaTest) Zaga Solutions DiscoLike Inc.

Consider this low-barrier form of contribution yourself. Your support is much appreciated.

Contributing

Thank you for your interest in contributing to NiceGUI! We are thrilled to have you on board and appreciate your efforts to make this project even better.

As a growing open-source project, we understand that it takes a community effort to achieve our goals. That's why we welcome all kinds of contributions, no matter how small or big they are. Whether it's adding new features, fixing bugs, improving documentation, or suggesting new ideas, we believe that every contribution counts and adds value to our project.

We have provided a detailed guide on how to contribute to NiceGUI in our CONTRIBUTING.md file. We encourage you to read it carefully before making any contributions to ensure that your work aligns with the project's goals and standards.

If you have any questions or need help with anything, please don't hesitate to reach out to us. We are always here to support and guide you through the contribution process.

Included Web Dependencies

See DEPENDENCIES.md for a list of web frameworks NiceGUI depends on.

Architecture

NiceGUI is a Python framework for building web UIs with a backend-first philosophy. Key architectural decisions:

nicegui (zauberzeug/nicegui)

interaction
Searching Database…

16.3K ·GitHub
What is this?NiceGUI is an easy-to-use, Python-based UI framework that shows up in your web browser, letting you build buttons, dialogs, 3D scenes, plots, dashboards and more without writing frontend code yourself.
Do I need to know HTML or JavaScript to use it?No. NiceGUI is backend-first: all UI logic lives in your Python code while the framework handles the web details, running a Python/FastAPI backend with a Vue/Quasar frontend under the hood and syncing over socket.io.
How do I get it running?Install the PyPI package, write your interface in a file like main.py, and launch it with ui.run(); the browser opens automatically and the page reloads whenever you edit the code.
What do I need installed besides Python?Just Python itself — NiceGUI is distributed as a PyPI package, a Docker image, and on conda-forge, so you can pick whichever fits your workflow.
Does it scale across multiple processes for heavy traffic?NiceGUI intentionally runs on a single uvicorn worker, relying on full async support instead of multi-process synchronization — a deliberate design choice rather than a bug, but something to keep in mind for very high-concurrency deployments.
Can I turn my app into a desktop app instead of a website?Yes — the same code can run as a webserver accessed through the browser or in native mode, opening as a regular desktop window.
What kind of UI elements come built in?Standard elements like labels, buttons, checkboxes, sliders and file upload, plus high-level ones for plotting charts, rendering 3D scenes, virtual joysticks, image annotation, tables, foldable trees, and video/audio embedding.
Can I use it inside Jupyter notebooks?Yes, NiceGUI runs directly in Jupyter Notebooks and works with Python's interactive mode.
Does the UI update automatically when my data changes?Yes, it provides straightforward data binding and refreshable functions so the interface updates with less boilerplate code.
What's it good for besides typical web apps?It's aimed at micro web apps, dashboards, robotics projects and smart-home solutions, and is also handy during development for tweaking ML algorithms or tuning motor controllers.
Creator
zauberzeug
Size
129.1 MB
Stars
16.3K
Age
5y
Commits · 90 Days