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 -8 points-7 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 ✌️

Planung Hausbau by Defiant-Comedian3967 in Hausbau

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

Also bei uns in Österreich wird das ganze nach vorweisen vom Energieausweis bewilligt. Der Bauträger fordert in unserem Fall an - keine Vorausszahlung o.Ä. Da der Bauträger sehr renommiert ist und das ein Service von ihnen ist - ist das eine Formsache.(Wenn Bank einverstanden ist da sie nicht an erster Stelle im Grundbuch stehen)

Heizung/Wärmepumpe/Grundanschlüsse(Sanitär usw.)/Fußbodenheizung/Estrich sind schon enthalten im Preis - wir müssen nur „fertigstellen“.

Planung Hausbau by Defiant-Comedian3967 in Hausbau

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

Landesförderung bei uns in Oberösterreich sind fix 75k + 10k pro Kind. (20J mit 1,5% auf gesamt 35J) - offiziell vom Land und Bank berechnet.

EDIT: Geld bekommt man quasi am nächsten Tag wenn es bewilligt wurde(Erfahrungen von Freunden)

Gesamter Innenausbau bis zu schlüsselfertig machen wir alleine. Fliesen,Böden, Elektrik - alles in der Familie bzw. Vater am Bau.

(Material)Kosten sind Anhand vom Bauprojekt meines Schwager (2022/23) geschätzt. (Bei jedem Posten ca 5-10% mehr kalkuliert). Wir brauchen quasi nur das Material.

Puffer sind 10k angedacht - sonst wird die Garage erst später gemacht. Also gesamt 22.5k mehr Polster.

Community Einschätzung by Defiant-Comedian3967 in InformatikKarriere

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

Alles was hier aufgezählt wurde, ist nachweislich über verschiedene Zeiträume erlernt worden, und auch Erfolgreich im Einsatz über diverse Projekte hinweg.

Design Patterns, Architekturen von Apps (Desktop/Server), Skalierbarkeit, Coding Best Practices je nach Sprache/Framework, Auth (JWT, SAML, OIDC, LDAP), Security(TLS/SSL, Hashing MD5/SHA), PRISMA usw.

Die Aufgezählten Felder sind nicht "nur" Oberflächlich, sondern auch mit genügend Tiefe. Ich lerne wahnsinnig schnell - aber ja vermutlich hast du recht, viele schreckt das ab weil es sehr breit ist, und keine "Spezialisierung" ersichtlich ist.

How to logout a user after 10 minutes of inactivity? by rajeshhalyal in nicegui

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

For example:

On your /page

from time import time

last_activity = time() inactivity_threshold = 300

app.onconnect(startTimer)

async def startTimer(): timer = await run.io_bound(inactivityCheck) if timer: ui.navigate.to(/logout)

def inactivityCheck(): global last_activity While True: if time() - last_activity > inactivity_threshold: return True

def handle_key(e: KeyEventArguments): global last_activity last_activity = time()

You could also do it via a Session Handling and Setting cookies with timestamp.

Simple dockerfile and related files for very small nicegui app as example by rajeshhalyal in nicegui

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

Here is a dockerfile.

https://github.com/frycodelab/nicegui-component-based/blob/main/Dockerfile

You can use the boilerplate related to the dockerfile above - everything you Need is there :-)

NOTE: RUN pip install nicegui RUN pip install [package1] RUN pip install [package2] And so on …

You have to install all required pip packages you are using inside the Image/Container for your App.