python-eel / Eel

A little Python library for making simple Electron-like HTML/JS GUI apps
MIT License
6.44k stars 587 forks source link

Hosting Eel on the web. #376

Closed JeswinSunsi closed 4 years ago

JeswinSunsi commented 4 years ago

Hey there, I was wondering if there is any way to host an eel app on the web. Any ideas?

samuelhwilliams commented 4 years ago

At the end of the day, yes, an Eel app could be made available on the web just like any other webserver. That said, this library has been primarily designed for smaller local apps and prototypes, so running it open on the web isn't really the primary purpose. To officially support that I'd want to spend more time investigating the implementation for wider security concerns, which at the moment isn't a really on the todo list. I'm a little hesitant to provide documentation around how to deploy Eel on the web in case people take that as implicit official support, but Eel runs bottle internally and there should be plenty of documentation around for how to deploy that (e.g. to Heroku or similar).

SoftDevDanial commented 4 years ago

Hi @samuelhwilliams Can you please elaborate "primarily designed for smaller local apps". Does it mean it will break if people use Eel on a bigger scale? or is it because it will be slower or probably use a lot of memory which on small local apps would not be noticeable but can be seen in larger local apps? Kinda noob in this area. Also , what do you suggest and recommend for people who have python scripts and wants it to be run on desktop and not on the browser with modern gui?

Thanks

samuelhwilliams commented 4 years ago

I was more emphasising the "local" aspect than the "smaller" aspect to be honest - as in Eel is designed mostly for offline local apps rather than being served over the web to multiple users. I'm not sure much thought has been applied to what happens when multiple users are using the app at the same time, and there could be race conditions.

For running simpler local Python scripts using HTML/CSS/JS for the layout/visuals, Eel is a fine choice that allows developers to build something useful fast. For creating complex multi-user browser-based sites and services, probably something else is a better fit. If you don't want the user to use the browser at all (i.e. native desktop apps) then you're looking at things like TkInter, wxPython, PyQT and similar things.

SoftDevDanial commented 4 years ago

@samuelhwilliams I see. Thanks!

JeswinSunsi commented 4 years ago

Ahh gottit. Also, Eel is pretty darn good. I've just completed my first GUI App. Its at https://github.com/JeswinSunsi/PentyDesktopAssistant . Thankss.