Skip to main content

High-Level Abstraction Web-GUI Using Just Python

Project description

NiceGUI

We like Streamlit but find it does too much magic when it comes to state handling. In search for an alernative nice library to write simple graphical user interfaces in Python we discovered justpy. While too "low-level HTML" for our daily usage it provides a great basis for "NiceGUI".

Purpose

NiceGUI is intended to be used for small scripts and single-page user interfaces with a very limited user base. Like smart home solutions, micro web apps or robotics projects. It's also helpful for development, when tweaking/configuring a machine learning training or tuning motor controllers.

Features

  • browser-based graphical user interface
  • shared state between multiple browser windows
  • implicit reload on code change
  • clean set of GUI elements (label, button, checkbox, switch, slider, input, ...)
  • simple grouping with rows, columns and cards
  • general-purpose HTML and markdown elements
  • built-in timer to refresh data in intervals (even every 10 ms)
  • straight-forward data binding to write even less code

Install

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: print('button was pressed'))

Launch it with:

python3 main.py

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

API

The API reference is hosted at https://nicegui.io and is implemented with NiceGUI itself. You should also have a look at examples.py for an extensive demonstration of what you can do with NiceGUI.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nicegui-0.2.13.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nicegui-0.2.13-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file nicegui-0.2.13.tar.gz.

File metadata

  • Download URL: nicegui-0.2.13.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.4.0-1047-azure

File hashes

Hashes for nicegui-0.2.13.tar.gz
Algorithm Hash digest
SHA256 393e31e6887ecfbab86ef34009bba7e12c6237ead7a3447ee67e35224a2dacc7
MD5 394954a9559a49abce9fdcaf473cefb5
BLAKE2b-256 b6b32fbad5c4232495740f7bdf9d1f688dcb7263b01d1c258f7bd059dcbc983d

See more details on using hashes here.

File details

Details for the file nicegui-0.2.13-py3-none-any.whl.

File metadata

  • Download URL: nicegui-0.2.13-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.4.0-1047-azure

File hashes

Hashes for nicegui-0.2.13-py3-none-any.whl
Algorithm Hash digest
SHA256 e8cbb6515ac8db9f452bac818a75c0c870c549d2151e95793fd5588d69c2674e
MD5 588f4cc90617f386a40b3361ac5c284e
BLAKE2b-256 90d8dfb71b5924917e4dd095b539bd7586a667db30f0544e963ed775ca563d5f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page