• Stars
    star
    8,647
  • Rank 4,234 (Top 0.09 %)
  • Language
    Python
  • License
    MIT License
  • Created over 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Create web-based user interfaces with Python. The nice way.
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

Features

  • browser-based graphical user interface
  • implicit reload on code change
  • acts as webserver (accessed by the browser) or in native mode (eg. desktop window)
  • standard GUI elements like label, button, checkbox, switch, slider, input, file upload, ...
  • simple grouping with rows, columns, cards and dialogs
  • general-purpose HTML and Markdown elements
  • powerful high-level elements to
    • plot graphs and charts,
    • render 3D scenes,
    • get steering events via virtual joysticks
    • annotate and overlay images
    • interact with tables
    • navigate foldable tree structures
  • built-in timer to refresh data in intervals (even every 10 ms)
  • straight-forward data binding and refreshable functions to write even less code
  • notifications, dialogs and menus to provide state of the art user interaction
  • shared and individual web pages
  • easy-to-use per-user and general persistence
  • ability to add custom routes and data responses
  • capture keyboard input for global shortcuts etc.
  • customize look by defining primary, secondary and accent colors
  • live-cycle events and session data
  • runs in Jupyter Notebooks and allows Python's interactive mode
  • auto-complete support for Tailwind CSS
  • SVG, Base64 and emoji favicon support

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.

You may also have a look at our in-depth examples of what you can do with NiceGUI.

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.

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.

More Repositories

1

rosys

An all-Python robot system based on web technologies. The purpose is similar to ROS, but it's based on NiceGUI and easier to use for mobile robotics.
Python
69
star
2

SimpleStorage

Simple platform independent key/value storage
C#
35
star
3

odrive-gui

GUI to configure the ODrive Motor Controller
Python
22
star
4

bacs

Bundle Adjustment for Camera Systems
Python
18
star
5

SharedGLContextsTest

Demonstrates how to load textures on a separate thread by using shared OpenGL contexts (without using the NDK).
Java
17
star
6

lizard

Domain-specific language to specify behaviour of microcontroller managed hardware
C
14
star
7

nicegui-highcharts

Python
12
star
8

livesync

Sync local code with (slow) remote machine
Python
10
star
9

field_friend

A Development Platform for Autonomous Weeding.
Python
10
star
10

quicktest

Library to write acceptance & integration tests for Xamarin.Forms with NUnit
C#
8
star
11

l4t-opencv

OpenCV 4.5.0 for Jetson (Linux for Tegra, l4t) with Docker.
Dockerfile
6
star
12

SimpleLocation

Simple platform independent location manager
C#
6
star
13

yolov5_node

Yolov5 trainer/detector for the Learning Loop
Python
4
star
14

xamarin.piwik

C#
3
star
15

InterfaceBuilder

Simplifying Xamarin.Forms ui construction by using the builder pattern
C#
3
star
16

fly_fastapi_socketio

Demo on how to use websocket connections with multiple fly.io instances
Python
2
star
17

binding

Bindable Properties for Python
Python
2
star
18

l4t-tkdnn-darknet

C++
2
star
19

ros_nicegui_image_example

A simple ROS2 example that uses a 2 way input switcher with a button. This was requested by a user.
Python
2
star
20

learning_loop_node

Python
2
star
21

XFormsPerformance

Why is Xamarin.Forms so slow when displaying a few labels (especially on Android)?
C#
2
star
22

IpCam2OpenGl

C# demo to display a MJPEG ip camera stream in OpenGL (OpenTK)
C#
1
star
23

FormsMenuIcon

C#
1
star
24

XFormsListViewCellReusingBug

Demonstrates a cell reusing bug in Xamarin.Forms on Android
C#
1
star
25

XFormsTouch

Cross platform touch events for Xamarin.Forms views.
C#
1
star
26

esp32-ble-command

BLE module for lizard
C++
1
star
27

ros_nicegui_turtlesim_joystick

A simple ROS2 example that uses a joystick to control the turtlesim node.
Python
1
star
28

air-link

Provide SSH access, diagnostics and administration for your edge devices.
Python
1
star