lost-theory

The blog of Steven Kryskalla.


 

WSGI talk code now online

written by stevek, on Dec 20, 2009 6:25 PM.

At the September 2009 Detroit Perlmongers / dynamic language meetup I gave a talk on Python and WSGI.

I walked through six different examples showing what WSGI is and some parts of the WSGI web development ecosystem. The six examples were:

  1. the simplest WSGI app, serving the same app under different servers
def application(environ, start_response):
    '''The simplest WSGI app.'''
    start_response('200 OK', [('content-type', 'text/html')])
    return ['<h1>Hello world</h1>']
  1. request and response wrapping, introduction to middleware
  2. an example of middleware
  3. a fleshed out app with templates, URL routing, and some more middleware


Great diagram explaining middleware from the Pylons documentation.
  1. form generation and validation
  2. using an existing app with authentication / authorization middleware

You can find the code and instructions for running the examples on Bitbucket.

Comments

Leave a Reply