Package: nicegui
NiceGUINiceGUI 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 asPyPI package,Docker imageand onconda-forgeas well asGitHub.Featuresbrowser-based graphical user interfaceimplicit reload on code changeacts 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 dialogsgeneral-purpose HTML and Markdown elementspowerful high-level elements toplot graphs and charts,render 3D scenes,get steering events via virtual joysticksannotate and overlay imagesinteract with tablesnavigate foldable tree structuresembed video and audio filesbuilt-in timer to refresh data in intervals (even every 10 ms)straight-forward data binding and refreshable functions to write even less codenotifications, dialogs and menus to provide state of the art user interactionshared and individual web pageseasy-to-use per-user and general persistenceability to add custom routes and data responsescapture keyboard input for global shortcuts etc.customize look by defining primary, secondary and accent colorslive-cycle events and session dataruns in Jupyter Notebooks and allows Python's interactive modeauto-complete support for Tailwind CSSSVG, Base64 and emoji favicon supporttesting framework based on pytestInstallationpython3-mpipinstallniceguiUsageWrite your nice GUI in a filemain.py:fromniceguiimportuiui.label('Hello NiceGUI!')ui.button('BUTTON',on_click=lambda:ui.notify('button was pressed'))ui.run()Launch it with:python3main.pyThe GUI is now available throughhttp://localhost:8080/in your browser.
Note: NiceGUI will automatically reload the page when you modify the code.Documentation and ExamplesThe documentation is hosted athttps://nicegui.io/documentationand provides plenty of live demos.
The whole content ofhttps://nicegui.ioisimplemented with NiceGUI itself.You may also have a look at ourin-depth examplesof what you can do with NiceGUI.
In our wiki we have a list of greatNiceGUI projects from the community, a section withTutorials, a growing list ofFAQsandsome strategies for using ChatGPT / LLMs to get help about NiceGUI.Why?We atZauberzeuglikeStreamlitbut find it doestoo much magicwhen it comes to state handling.
In search for an alternative nice library to write simple graphical user interfaces in Python we discoveredJustPy.
Although we liked the approach, it is too "low-level HTML" for our daily usage.
But it inspired us to useVueandQuasarfor the frontend.We have built on top ofFastAPI,
which itself is based on the ASGI frameworkStarletteand the ASGI webserverUvicornbecause of their great performance and ease of use.ContributingThank 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 ourCONTRIBUTING.mdfile. 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 DependenciesSeeDEPENDENCIES.mdfor a list of web frameworks NiceGUI depends on.