this post was submitted on 07 Jan 2025
26 points (100.0% liked)

Python

6496 readers
1 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

๐Ÿ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

๐Ÿ Python project:
๐Ÿ’“ Python Community:
โœจ Python Ecosystem:
๐ŸŒŒ Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS
 

I'm pretty new to Python because I haven't used it much for many projects over the years, but i decided to use it to make a web app recently with flask to practice. It calls a simple python program that does some file conversion. There's no database.

I'm hosting it on Python Anywhere for free right now. It's for an old TTRPG, so useful for a niche community, but probably not big enough to be worth hosting fees. Just in case, I'd also like to be able to keep an installer on my github or a Dropbox. The hope is others can still grab it, spread it, and install it long after I've lost interest or gotten hit by a bus.

From my googling, I see 3 main options:

  • Path 1: Keep the basic structure of a web app and use one of the frameworks that let me run it in a computer's browser offline.
    • The options here seem to be Flaskwebgui, Electron, or NW.js.
    • This seems the simplest and most straightforward way.
    • Web GUI is ubiquitous nowadays.
    • Part of me also doesn't like that everything has become a web app. I don't even know why. Maybe I don't like the idea of Google controlling everything.
  • Path 2: Keep the basic backend logic but rewrite the web GUI with a desktop GUI, making it more of a true native desktop app.
    • The options here seem to involve using pyinstaller and then some python GUI library/framework like Tkinter, PyQt, PySide, or Dearpygui.
    • I feel this will be slightly more work but it's a super simple UI so remaking it isn't a huge deal.
    • My instincts tell me the end result might be faster, since it won't have to deal with a browser middleman or web routes and such. But, I might be wrong, it might just be my old-ass not used to everything being an electron app nowadays.
    • Might also be more self-contained from carrying it's own libraries and not relying on browser compatibility? Idk.
    • Probably more OS dependent, though. Not sure how easy it is to make it work with PC, Mac, and Linux users.
  • Path 3: There seems to be some way to combine flask and pyinstaller so sounds like a combination of the two is an option, too. Haven't looked into this too much though since most of my search results talked about the above two paths.

So which way is best? And which framework/library/tool in that path?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] WanderingVentra@lemm.ee 4 points 2 days ago* (last edited 2 days ago) (1 children)

My highest priorities are having it useful for a variety of users, lasting awhile, and general quality (responsiveness, actually works, etc). After that I'm pretty evenly split between doing it quickly, doing it in a way that would help me learn more Python for my career, and making it look good.

[โ€“] sum_yung_gai@lemm.ee 1 points 1 day ago (1 children)

If it's just xml parsing and you are willing to rewrite in typescript I recommend writing as a static web app served through GitHub pages. Free hosting :D