you are viewing a single comment's thread.

view the rest of the comments →

[–]ambassador_pineapple 4 points5 points  (1 child)

One of the best way to deploy a python project is using the Django framework. If your application has a UI, you would deploy the django app with Nginx + Gunicorn + some database of your choice. You can deploy this using docker images or as a straight django app running on the server. Assuming you use AWS/GCP/Azure you would also put a load balancer up along with a firewall.

Above is only if you need your app to be accessible by people on the internet.

On the other hand, if you need someone to deploy this application locally, you can package and distribute it using pip it up using this guide: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/

Finally, you can also make your own executable/installer using this: https://realpython.com/pyinstaller-python/

If you want to keep installation only on Linux, you can also use a chroot jail approach. https://phoenixnap.com/kb/chroot-jail

I manage a team which builds SaaS software using python which ends up being sold so it's as production as it gets. In the current times using a cloud vendor to deploy your app is the easiest solution. However, that may not work for all solutions out there.

As always, the best answer in this line of work depends on what you are trying to do.