What's the Best Way to Create a GUI in Python Without Sacrificing Security?
Asked by
drop.leaf.table
Hey everyone! I'm a front-end developer experienced with HTML and CSS, and I've been tasked with building a GUI for a client using Python. I stumbled upon PyWebView, which seems appealing because it lets me work with what I know: HTML, CSS, and JavaScript, rather than diving deep into a Heavyweight GUI framework like PySide or Tkinter. The application needs to be compiled, probably with PyInstaller or something similar, and it will run locally on the client's machine, without any external server connection. My main worries are about the security aspects of using PyWebView, such as risks of unwanted code execution or insecure file access. Is PyWebView a reasonable choice for an app that will be distributed to users? I'd love to get your thoughts on best practices or any experiences you might have had with this setup! Thanks in advance!
Answers
If you're looking for something better than PyWebView, check out NiceGUI. Itโs a proper GUI toolkit that lets you create components using Python on the server-side while still allowing for some HTML/CSS. This way, you focus on the application logic rather than getting bogged down with the low-level DOM manipulations. Plus, itโs open-source and backed by a strong community!
Reply to this answer
Have you considered using Flet? Itโs another good option for building GUIs in Python, although it's relatively new and has some limitations. Ensure it meets all your requirements, especially since itโs designed for multi-platform use.
Reply to this answer
Streamlit could be perfect if itโs for something like an internal dashboard. It provides a straightforward setup and looks good out of the box, but if you need more customization, you might want to explore other options.
Reply to this answer
Add your answer
Answers are reviewed before publication.
puzzled by invoices!: More customization might be worth it if youโre going public with the app!