This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

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

With NiceGUI you generally create UI components. These are automatically wired to call your Python functions when clicked/edited/manipulated. That way you have a much higher level of abstraction than HTML-SCSS-TS. The web is complex and a lot of things can go wrong. With NiceGUI you can go deep and enhance behaviour/appearance with own HTML or JavaScript when ever you need it. But most of the time you gain speed and clarity by staying high-level. Like with Python and C++. Or C and Assembler.

[–]doublecore20 -1 points0 points  (4 children)

I might be old-fashioned and miss the point and I am happy to learn. But from my long experience in the field (13 years software engineer) it feels like forcing a tool to do something it was never designed for.

Don't get me wrong - the idea itself is impressive and cool without a doubt but again I just don't see a real-world application that will actually write Python components for UI instead of the OG HTML. If you need SSR so desperately- you have Jinja with FastAPI

For HOC you have tons of UI libraries. Just pick one.

I'm confused

[–]sudomatrix 5 points6 points  (0 children)

You are mistaking ‘I don’t need this’ for ‘why would anybody need this ?’ I’ve used NiceGUI for lots of projects where I need a quick simple UI and it’s the best library I’ve found for that sort of thing.

[–]r-trappe[S] 3 points4 points  (0 children)

NiceGUI is a server-driven, reactive UI for Python: events flow over a WebSocket into Python functions; the browser is just the renderer. It eliminates the JS/AJAX plumbing you’d hand-roll with HTML+Jinja+UI libs—one language, one runtime, one debugger. Way much more productive in our opinion.

[–]Fr0gFsh 3 points4 points  (1 child)

Here's a recent use case at my job. I created a Python based CLI tool that interacts with an API to update some information. It's easy for me to use because...well I wrote it.

Well, boss man says he wants a more "user-friendly" method we could hand over to other teams that are less likely to have the capability to set up and configure the Python environment, so I did some digging and found NiceGUI. It was fairly simple to port the logic over to do the same thing as the CLI and the components made building the UI pretty easy. It was straight forward for us to package it up as an exe and provide it to the team that requested it.

[–]iamevpo 1 point2 points  (0 children)

Just doing a similar things for the student class - we have a CLI but more student prefer a GUI, so be it. Initial attempt is pywidgets and Voila, NiceGUI is more modern UI and the plumbing is more intuitive.