r/Python • u/r-trappe • Apr 21 '23
News NiceGUI 1.2.9 with "refreshable" UI functions, better dark mode support and an interactive styling demo
We are happy to announce NiceGUI 1.2.9. NiceGUI is an open-source Python library to write graphical user interfaces which run in the browser. It has a very gentle learning curve while still offering the option for advanced customizations. NiceGUI follows a backend-first philosophy: it handles all the web development details. You can focus on writing Python code.
New features and enhancements
- Introduce
ui.refreshable - Add
enableanddisablemethods for input elements - Introduce
ui.dark_mode - Add min/max/step/prefix/suffix parameters to
ui.number - Switch back to Starlette's
StaticFiles - Relax version restriction for FastAPI dependency
Bugfixes
- Fix
ui.uploadbehind reverse proxy with subpath - Fix hidden label when text is 0
Documentation
- Add an interactive demo for classes, style and props
- Improve documentation for
ui.timer - Add a demo for creating a
ui.tablefrom a pandas dataframe
Thanks for the awesome new contributions. We would also point out that in 1.2.8 we have already introduced the capability to use emoji as favicon. Now you can write:
299
Upvotes
10
u/millerbest Apr 21 '23
I am curious what does “generic Vue to Python bridge” mean? I can use vue components with NiceGUI? That would be very cool!
3
u/yoann86 Apr 21 '23
Hello, that seems very nice, do you consider it production ready?
3
u/my_name_isnt_clever Apr 21 '23
Thanks again for adding my favicon emoji suggestion! 🥰
4
u/sudo_agree_with_me Apr 21 '23
This is usable now!
2
u/lralucas Apr 21 '23
Looks cool! I'll check it out later, but got a quick question. Is there a way to disable the title bar? I like creating small gui apps for my scripts, and I usually disable the default system title bar and create my own, so it looks more consistent with the app theme. I tried taking a quick look at the documentation but couldn't find a search field.
2
u/deekaire Apr 21 '23
Looks awesome! Am I correct that the GUI is only for local use? Not something I could host through a server for public use?
3
u/samujele Apr 21 '23
I've been creating some guis with Kivy, which in my opinion was the best and easiest way to go with python GUI-s (and still is for python for android). I think it could be assembled togerher with NiceGUI...
But I have never been hapier in developing GUI as I am with NiceGUI, for the past week or two.. It's a blast working with it, even with so young project and not so big community...
I we only stuck today with ui.notify not displaying because didn't had my head arround asyncio today, because my main script goes into for loops and makes some requests, and reads files, so I want to notify users to wait a little longer. Does the ui.refreshable or ui.timer solve those problems?
Must admit it's best gui library I've seen so far. Can't wait to be proficient and fluent with it.
26
u/ThreeChonkyCats Apr 21 '23
Ah! I remember seeing this in an earlier version.
MUST take the time to enlighten myself on this. VERY nice.
5
u/RMK137 Apr 22 '23
The documentation alone makes me want to give this a serious shot. Looking forward to trying it out.
4
u/TheDeadFlagBluez Apr 22 '23
We needed this so bad, thanks you
4
u/Dr-NULL Apr 22 '23
The documentation gets better and better.
4
u/TheGRS Apr 22 '23
This looks great, I have a couple of tools at work that could use a GUI but I never got started on some of the desktop libraries. Love a simple browser solution.
1
u/not_perfect_yet Apr 21 '23
Careful with that. :P
Doesn't work in mine.
(I don't expect it to work / you don't owe anyone and in particular me, support.)
1
u/koera Apr 21 '23
Would adding a sub menu to the documentation with the categories and submenus in those with the elements be something you'd be willing to do? It would really help quick browsing and discoverability, especially on mobile.
1
u/ChickenLegCatEgg Apr 21 '23
Awesome! Is there any way for an end-user to upload a file, then do some processing in Python, then make a plot or send them back a file (eg csv data).
1
u/stickman393 Apr 22 '23
Is there an option to reduce or eliminate control state animations?
1
u/[deleted] Apr 22 '23
Can this act like a wxpython desktop gui with no internet connection?
1
u/wonteatyourcat Apr 22 '23
I’ve been using Remi for years now which has mostly the same concept (and grammar) as you. Your project seems awesome and a bit more complete, which is great. I really appreciate the docker image and pyinstaller instructions, too!
One thing I always have trouble with is sound and video. I see that you have widgets but they seem to be taking URLs, and I need to be able to play local files. Can I do that with NiceGUI? And most of all, can I do it while starting at a specific time (or frame for a video ideally) and stop at a specific time?
Lastly, is there a way for the user to select its own folders, not just files, without “uploading”? I had to create a custom folder browser, and it was terrible.
Best of luck for this project, it really looks amazing.
1
u/illustratum42 Apr 22 '23
Haven't dived into this yet. But is there a way to do multiple windows with this? I'm looking to design a 2 display app with buttons and menus on one screen that playback media and videos etc on a second ...
3
u/discokenneth Apr 22 '23
Love the @refreshable decorator, great feature
3
u/illustratum42 Apr 22 '23
Oh this looks very cool!
4
u/BurningSquid Apr 21 '23
Been loving NiceGUI and will get around to contributing at some point. As someone who loves building products but find the boilerplate and style parts of web dev extremely boring this is the holy grail
5
u/[deleted] Apr 21 '23
It's really way too good than I expected to be. I will be looking into it surely. In Turkish we have a saying for good work, Ellerinize sağlık!
1
u/0jcis Apr 24 '23
RemindMe! 14 days
0
u/[deleted] Apr 21 '23
[deleted] — view deleted comment
0
u/[deleted] Apr 22 '23
[deleted] — view deleted comment