Let’s Build A Web Server 2

how to run Web server with multiple Web frameworks without making code changes either to the Web server or to the Web frameworks?

  • The answer is WSGI(“wizgy”)

WSGI allowed developers to separate choice of a Web framework from choice of a Web server. Now you can actually mix and match Web servers and Web frameworks and choose a pairing that suits your needs. You can run Django, Flask, or Pyramid, for example, with Gunicorn or Nginx/uWSGI or Waitress. Real mix and match, thanks to the WSGI support in both servers and frameworks: