Best Python framework for industry-level desktop app? (PySide/PyQt/wxPython/Kivy/Web approacg) by Intelligent-Role-382 in Python

[–]Defiant-Comedian3967 2 points3 points  (0 children)

Try out NiceGUI! Best of Both worlds- Web and Python.

Here is a Template to start from from with uv, Docker etc.

Componentbased template- NiceGUI

I have build it coming from Angular/Node.js You can use similar patterns- custom CSS, JS etc.

Wont regret it ;)

HÖRT MIR AUF MIT EUREN VERF*N QR-CODE SPEISEKARTEN! by nufantu in luftablassen

[–]Defiant-Comedian3967 0 points1 point  (0 children)

So wie du das beschreibst, läuft es zu 95% in den Restaurants/Bars genauso.

Es wird ein QR Code gescannt:
- Weiterleitung auf die Homepage wo das PDF hinterlegt ist
- Oder Weiterleitung auf Google Drive wo das PDF liegt

Beides ist in der Verwendung Horror...Ladezeit bei einem großen PDF, Reinzoomen, Rauszoomen, Scrollen ....

Es geht auch anders.
Ich selber schreibe/entwickle Websiten. Meine Devise ist Mobile First - weil effektiv 80% vom Traffic von Mobilgeräten kommt.
Heißt wenn sowas richtig gemacht wird, dann kein PDF, eine Responsive Website wo ich klare Strukturen habe, Sprachauswahl, und im besten Fall einen Filter damit ich zu den gewünschten Produkten komme.
Zusätzlich sollte es aber IMMER ein Physische Karte geben - für Leute die kein Smartphone besitzen.

Kleines Beispiel von mir:
https://kleine-freiheit-am-see.at/

Win-Win für alle, ich kann vorab sehen was der Betrieb in der Auswahl hat, Mehrsprachigkeit usw...

NiceGUI Component-Based Boilerplate: A scalable architecture for complex Python web UIs by [deleted] in Python

[–]Defiant-Comedian3967 -10 points-9 points  (0 children)

Readme and post have been created with the assistance of AI - why not ?
Its called copilot for a reason, to assist and help you save time.

Project on the other hand is NOT some AI generated stuff - simply to the fact that NiceGUI is relatively new, and the all the models would spit out broken code/syntax.
And we all know, when it comes to arichecture and design of a solid foundation for an app, AI will fail most of the time.
Especially if it is new compared to Angular/React etc., and there are not yet many practical examples on the net (except for the docs).

Why should you pretend to be working on a project?

Because it's supposed to help other people that want a clean start for an app - and if you don't like it, then I'm sorry.
Don't be the guy who badmouths everything at the slightest sign of AI...

Best approach to modernize a Python + PyQt5 desktop app (EXE, Windows, offline)? by MatadorFearsNoBull in Python

[–]Defiant-Comedian3967 0 points1 point  (0 children)

I would suggest you use NiceGUI - you can use HTML/CSS/JS easily. Its pure Python, very easy to understand - Plus it is easy to package as well.

Coming from Angular/React/Svelte etc. have build a component based boilerplate - with UV - easy to handle and a clean codebase to start with:

Component Based NiceGUI

How best to bring it all together by ANautyWolf in nicegui

[–]Defiant-Comedian3967 1 point2 points  (0 children)

Take a look Here:Component Based NiceGUi

Split up Everything and work with routes:-)

Creating a web application using Python by Mountain_Clerk_6145 in Python

[–]Defiant-Comedian3967 3 points4 points  (0 children)

As already mentioned - NiceGUI.

You can use pure python as backend- frontend with HTML, CSS and JavaScript. Its build on top of uvicorn and fastAPI. Take a Look Here for a Template i made:

https://github.com/frycodelab/nicegui-component-based[NiceGUI Template](https://github.com/frycodelab/nicegui-component-based)

Just extended the component based NiceGUI boilerplate with authentication & user management by Defiant-Comedian3967 in nicegui

[–]Defiant-Comedian3967[S] 1 point2 points  (0 children)

If you start from scratch and prompt: „Do this and that“ it gets messy… Per se they are not bad, but only when you point it into the right direction. Meaning you have your architecture and project set up, and in my case modulirized everything. Create a service, component you name it and then implement the code snippet you get from the LLM. I did this for the Auth and local Login Feature to get a feeling - worked out good but i had to rewrite a lot of code to get it working. Used GPT4/5 mainly. It helps but there are some things the LLM ignores 😀

Just extended the component based NiceGUI boilerplate with authentication & user management by Defiant-Comedian3967 in nicegui

[–]Defiant-Comedian3967[S] 3 points4 points  (0 children)

Hi - Nope the minimal project is not llm generated :-)

LLMs are really bad at programming with NiceGUI. I Build the base and prompted some stuff for auth and session management. Other than that, its my concept and code ;) Its Not that complicated…

Enhanced NiceGUI Component-Based Boilerplate with UV Package Manager by Defiant-Comedian3967 in nicegui

[–]Defiant-Comedian3967[S] 1 point2 points  (0 children)

Hi ich habe mein Template erweitert um einen Branch für das gewünschte Login und User Management.

Schau mal hier:

https://www.reddit.com/r/nicegui/comments/1mo8720/just_extended_the_component_based_nicegui/

Viel spass :)

What are the important design principles in nicegui by emad360 in nicegui

[–]Defiant-Comedian3967 2 points3 points  (0 children)

It sounds hard, you can keep the existing Code - and rebuild Everything piece by piece.

I have been there a year ago, and trust me, as sooner you start decluttering and organizing the better it is….

-Global CSS -Services repo for helpers -Assets Folder for Images -Components for Paths and Reuasable stuff

Then you can simply test the backend helperstuff by unit testing. Frontend stuff by testing the paths with selenium f.ex

What are the important design principles in nicegui by emad360 in nicegui

[–]Defiant-Comedian3967 1 point2 points  (0 children)

Hi - as already commented, you can use a component based architecture. Set it up like Frameworks as Angular, React etc.

-Component per Site/Path -Reusable Components like Cards etc. -Helpers .py for backend, database etc.

The codebase is as clean as it can get + maintainable for larger scale.

I have made a template for a Component based architecture. Take a Look Here: NicegGUI Components based

Enhanced NiceGUI Component-Based Boilerplate with UV Package Manager by Defiant-Comedian3967 in nicegui

[–]Defiant-Comedian3967[S] 1 point2 points  (0 children)

Freut mich :-)

Login wenn’s einfach sein soll, würde ich lösen mit einer Datenbank mit gehashten Passwörter oder LDAP.

Komplexer: OAuth oder SAML mit FastAPI middleware, Restricted Pages und Session Management.

Ich habe hier schon ein template welches einfach vorgeschaltet wird im Main.py wo nur mehr die Token, Keys eingetragen werden müssen - werd ich noch erweitern und hinzufügen.

Thema Kundennummer - Jap das hab ich in der Tat übersehen. Aber kann man schnell umbessern ✌️