You’ve just written a great Python web application. Now, you want to share it with the world. In order to do that, you need a server, and some software to do that for you.

The following is a comprehensive guide on how to accomplish that, on multiple Linux-based operating systems, using nginx and uWSGI Emperor. It doesn’t force you to use any specific web framework — Flask, Django, Pyramid, Bottle will all work. Written for Ubuntu, Debian, Fedora, CentOS and Arch Linux (should be helpful for other systems, too). Now with an Ansible Playbook.

I spent Saturday on rewriting a Flask app in Django. The app in question was
Nikola Users, which is a very simple CRUD
app. And yet, the Flask code was a mess, full of bugs and vulnerabilities.
Eight hours later, I had a fully functional Django app that did more and fixed
all problems.