-
pip3 install pyinstaller
-
we have a sample flask app server.py
from flask import Flask server = Flask(__name__) @server.route("/") def hello(): return "Hello World!" if __name__ == "__main__": server.run(host='0.0.0.0')
-
pyinstaller -F server.py
it will create a executable file server in ./dist -
verify the executable file
root@labvm:~/python_docker/src/dist# ./server * Serving Flask app "server" (lazy loading) * Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Debug mode: off * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
if you have static and templates folder and other py files, you can run command like:
pyinstaller -F -i BreezePython.ico --add-data="HttpServer\static;HttpServer\static" --add-data="HttpServer\templates;Httpserver\templates" --add-data="settings.py;." manage.py
Wonderful beat ! I wish to apprentice while you amend your site, how can i subscribe for a blog website? The account helped me a acceptable deal. I had been tiny bit acquainted of this your broadcast provided bright clear concept Caryn Skip Proud
I really appreciate this post. I have been looking everywhere for this! Thank goodness I found it on Bing. You have made my day! Thx again! Karleen Jonah Hayyim
Thank you so much for giving everyone such a pleasant opportunity to check tips from this blog. It can be very kind and stuffed with a lot of fun for me and my office colleagues to visit the blog at the very least three times every week to read the new items you will have. Of course, I am just always fulfilled with your extraordinary concepts you serve. Selected 3 areas in this post are in reality the most suitable we have all had. Josie Roderick Wulf
great points altogether, you just gained a brand new reader. What would you recommend in regards to your post that you made some days ago? Any positive? Tabbatha Mordy Baptlsta
You have noted very interesting points! ps decent site. Lynde Reynard Estas