What *is* WSGI?

2 min readOct 30, 2019

I’m in week three of my internship. Three weeks of long slogs, new friends, deep befuddlement and profound clarity.

And after three weeks, I want to explain to you, (and me) what a WSGI is.

I first heard of a WSGI a week and a half ago. It was after I asked my boss, ‘hey, what framework do you recommend using?’ and he replied, ‘oh, we tend to stay away from frameworks. I sent you a WSGI script. Use that.’

And then my inner voice said ‘we stay…away…from….frame..wha-huuuht? …h-how? How do? WsGWHAT….model…how…SGI…’ and then I passed out.

I was, and always will be, a dramatic soprano.

After I regained consciousness, I tasked myself with figuring out what in the H a WSGI is. Here’s the bare minimum you need to know, in 5 points or less, making one of the points whiskey. (You’ll see)

  1. WSGI is a spec that standardizes the way for web servers and Python web applications and frameworks to interface (talk to each other). In the olden days of the Wild West of the internet, some Python apps couldn’t talk to servers where other’s could. So WSGI was created to standardize rules of engagement between the two.
  2. It deals with, at a minimum, two things: a set of rules for talking to a web server, and a set of rules for talking to an application.
  3. You can also create your own middleware with a WSGI, which is usually written in Python, utilizing both the server and the application sides of the API.
  4. It ‘sits’ between the Python web application and the web server.
my best

5. It is pronounced, you guessed it…

a whiskey glass sitting on a barrel