Akshar Raaj

Akshar Raaj

Audience level:
9:50 a.m.–10:35 a.m.

Basics of WSGI


Your framework provides an easy way, like ./manage.py runserver, to start a server and serve requests. But things start getting trickier in production as you can't use runserver in production and you need to use a WSGI compliant server. And you don't understand WSGI properly.

In this talk, I intend to lessen(hopefully remove) the confusion surrounding WSGI.


We will start with a discussion of WSGI. It involves:

  • WSGI Standard
  • WSGI Server
  • WSGI Application

Our objective will be writing a web application which works with few different urls. Serving these requests require a web server. We will use a WSGI compliant server provided as part of Python standard library. And then we will interface our application with this web server.

All this will be pure Python and we will not use any framework.

We will replace default Python server with Gunicorn(a WSGI compliant web server). This will help establish that we can easily switch between web servers as long as the server is WSGI compliant, and it won't require any change to web application code.

Platinum Sponsors:

Silver Sponsors: