Convert Python Flask App to exe File || Convert py to exe file

preview_player
Показать описание
Convert Python Flask App to exe File || Convert py to exe file
Рекомендации по теме
Комментарии
Автор

A lot to unpack that is happening in this excellent video that I feel needs some breakdown for many of us

Shot summary of what is happening here
- Python app using Flask as web framework
- Python app itself is not doing much except rendering the index.html & page2.html (which is in the /static & /templates folders)
- Python app is using pywebview library which allows to display HTML content in its own native GUI window.
- html + css + js are used for the calculator app (code are in /static & /templates)
- Using Auto PY to package the python app (py file) + /static + /template folder into one exe file (and choosing icon for your exe file)

This approach is excellent for distributing a small(ish) python app that needs to run LOCALLY without having to worry about dependencies, presence of container runtime env at the target OS. I am not certain but I believe Auto PY can also package for Mac OS & Linux if you run it from a MAC OS or Linux OS (as it basically runs PyInstaller under the hood).

What I like most about this approach is even though you need to know some html, css (and possibly some JS) for this approach to create a GUI for your python app, this approach is your intro into WebDev. It is far better skill to have than learning any of the python gui libraries (tkinter, kivy, PyQt, ...). html, css, js have far more learning resources online and is a transferable skill to other programming languages not to mention it is a needed step if you ever want to publish your python app as a service (you can containerize and publish in AWS EKS or Azure AKS).

AmrXcellent
welcome to shbcf.ru