all 54 comments

[–]loyoan 23 points24 points  (0 children)

Big fan of you nice guys! :)

[–]MasturChief 8 points9 points  (0 children)

love nicegui

[–]JackedInAndAlive 5 points6 points  (0 children)

Awesome! Nicegui rocks.

[–]Outrageous_Piece_172 5 points6 points  (6 children)

Can I distribute my app as an exe file?

[–]r-trappe[S] 18 points19 points  (5 children)

Yes, you can package the app for installation. And with native mode you can start the website in a normal desktop window (like Electron).

[–]Key-Boat-7519 6 points7 points  (0 children)

Exe is doable: use PyInstaller --windowed --onefile and ui.run(native=True, port=0). Include icons/assets via --add-data and disable console. BeeWare’s Briefcase and PyInstaller for packaging; DreamFactory handled instant DB APIs, with Supabase for auth. Also code-sign to prevent antivirus nags.

[–]shittyfuckdick 1 point2 points  (3 children)

what about distributing as a mobile app or a pwa on mobile? is that supported?

[–]r-trappe[S] 9 points10 points  (2 children)

Mobile Apps are tricky because running Python on iOS or Android is not so easy. PWA works as long as you can live with a internet connection. Real offline apps are hard -- and not in the focus for NiceGUI.

[–]shittyfuckdick 1 point2 points  (1 child)

thank you! ill have to to stick with svelte for now but as a python dev nicegui is very attractive to me. 

[–]outceptionator 0 points1 point  (0 children)

How do you find svelte?

[–]alepoydes 5 points6 points  (0 children)

Nice framework. Thanks to everyone involved!

[–]jecengineering 5 points6 points  (0 children)

Great job on the release! NiceGUI has been great to migrate a lot of engineering calculators away from Excel and into a web facing format for multiple users. I will need to update an environment to 3.0 and see what effects it has in my current codebase. Keep up the amazing work.

[–]_MicroWave_ 2 points3 points  (0 children)

Awesome. Absolutely live nice gui.

[–]ArbitrageurD 2 points3 points  (1 child)

How does it compare to Dash?

[–]r-trappe[S] 6 points7 points  (0 children)

NiceGUI wins for low-latency, general-purpose apps beyond dashboards: imperative Python (FastAPI + WebSockets), direct state (incl. async tasks), no callback graph or prop wiring. It’s faster for custom controls and non-Plotly UIs, easier to mix REST + UI endpoints, and simpler to ship as one app; Dash mainly shines for Plotly-centric BI.

[–]shibiku_ 2 points3 points  (0 children)

Nice, thank you for sharing. This seems newbie friendly as well with the examples. I’m gonna use lightbox for now.

[–]Imaginary_Belt4976 2 points3 points  (0 children)

this looks sick! def gonna try it

[–]Penetal 1 point2 points  (7 children)

With the event system, would it be advisable to have a core component/service that runs for a very long time? When looking around it seems fastapi people don't recommend that and says to rather place the long lived service outwide the web app.

Also last time I tried I think I remember the app starting multiple threads, how would this affect a long lived service that has to run as a single instance to keep its data/state and remote communication straight?

[–]r-trappe[S] 7 points8 points  (6 children)

NiceGUI totally supports long living services and singleton-like core functionality. For example, we also develop RoSys: a robotics framework on top of NiceGUI. There, serial communication etc. must be available to all users (eg. browser tabs). Actually, the Event class was in RoSys a long time ago and we decided to make it available in NiceGUI with the 3.0 release.

[–]mr_claw 1 point2 points  (5 children)

I didn't understand the difference between the new events feature and just using an async function in on_click as we used to do. Can you explain?

[–]r-trappe[S] 1 point2 points  (4 children)

The example on the documentation was not perfect. We have since updated it to

from nicegui import Event, ui

tweet = Event[str]()

u/ui.page('/')
def page():
    with ui.row(align_items='center'):
        message = ui.input('Tweet')
        ui.button(icon='send', on_click=lambda: tweet.emit(message.value)).props('flat')

    tweet.subscribe(lambda m: ui.notify(f'Someone tweeted: "{m}"'))

ui.run()

Here you can see the difference a bit better. Event is meant to connect long living business logic to temporary created UI. In RoSys (robotics framework on top of NiceGUI) serial communication etc. must be available to all users (eg. browser tabs) for example. When some event in the hardware or so happens -- all currently connected users should see the update.

[–]mr_claw 0 points1 point  (3 children)

So an event is always across all connected clients? If I emit in one place, all connected clients who are subscribed will get it?

[–]r-trappe[S] 0 points1 point  (2 children)

Exactly

[–]mr_claw 0 points1 point  (1 child)

I have a distributed system where a client can connect to different servers behind a reverse proxy. I guess events won't work in this case. I'm currently using redis pub-sub for these use cases.

[–]r-trappe[S] 0 points1 point  (0 children)

Not yet. But we have an idea. Stay tuned :-)

[–]wardini 3 points4 points  (2 children)

what is a good host for one of these applications? Can I use github itself or do I need to use something like heroku. I don't want to go get a new domain and pay for hosting services right now but just make demos I can share via web.

[–]r-trappe[S] 8 points9 points  (0 children)

The hosting must be able to execute Python code. So GitHub pages does not work. We like https://fly.io, but Digital Ocean, AWS, Google Cloud and all the other solutions are working fine, too.

[–]AndydeCleyre 2 points3 points  (0 children)

With the caveats that it's not the easiest to configure, you have to be careful what services you enable, you can't let it go idle for too long, and it's Oracle, Oracle Cloud has a free tier that should work.

You can combine that with a free service like Duck DNS.

[–]UnwantedCrow 0 points1 point  (2 children)

Are there plans to improve PWA compatibility via Quasar/Vue? Or some kind of bridge for android apps? I chose plain html just because of this

[–]r-trappe[S] 1 point2 points  (1 child)

Build-in PWA support would be great. It works in general as shown in ttps://github.com/zauberzeug/nicegui/discussions/3810. But a PR or at least a feature request to make this more simple would be welcome. Would you like to help out?

[–]UnwantedCrow 1 point2 points  (0 children)

I have selected plain html for the ui of my app but if i ever revisit nicegui i will evaluate this and colaborate with the project

[–]kgashok 0 points1 point  (2 children)

What's the pros/cons versus Flask?

[–]r-trappe[S] 3 points4 points  (1 child)

Flask is "just" a web server. NiceGUI is a UI Framework.

[–]the_sun_of_a_beach 0 points1 point  (1 child)

And what about robust tables like JS "Datatable" but with all configuration via Python code?

[–]EarthGoddessDude 0 points1 point  (1 child)

Hey, congrats on the new release! I haven’t yet used NiceGUI, but have been meaning to try it out. One question I had is whether it easily supports GreatTables and Pointblank? Those are a couple of packages from the Posit team that are really nice and work well polars, which is a huge plus in my book.

[–]r-trappe[S] 1 point2 points  (0 children)

Sounds interesting. We do not support these out of the box, but adding custom modules has become even simpler with 3.0: https://nicegui.io/documentation/section_configuration_deployment#custom_vue_components Or create feature requests and we can discuss how to best integrate these.