July 20th, 2010

“WSGI from Start to Finish” materials available

I’ve just uploaded the materials for my tutorial at EuroPython 2010, “WSGI from Start to Finish”. You can also get the slides and the WSGI cheat-sheet individually. I’ve updated the slides so that they make sense even without me speaking; so now they have references to the code examples.

The tutorial was recorded and should be published on the EuroPython Web site after the event.

This was the first time I give such a long talk. Three hours talking about WSGI! But it was really fun. And the room was absolutely full, which I couldn’t believe.

Comments

  1. eGlyph on 20 Jul 2010 at 7:14 pm #

    Thank you good sir, it’s a very nice presentation. Will there be video available?

  2. Gustavo on 20 Jul 2010 at 8:41 pm #

    @eGlyph: I think so. It should be available once EuroPython is over.

  3. Graham Dumpleton on 21 Jul 2010 at 12:46 am #

    One comment about your slides.

    Under ‘No unknown length wsgi.input’ you state ‘Some libraries use “-1”.’ and ‘Others use “0”, which actually means “there are no bytes in wsgi.input”.’. If any WSGI hosting mechanism is using ‘-1′ then they are likely violating both CGI and WSGI specifications and would also probably break any WSGI applications. The use of ‘-1′ has only ever been a suggestion as far as I know for a future version of WSGI and not actually used.

    Where chunked request content is used, there is no Content-Length header. Technically there should also probably thus be no CONTENT_LENGTH variable at all in the WSGI environment and WSGI specification allows for it to be missing, but wouldn’t be surprised if some WSGI adapters always populate it with 0 even though no such header supplied.

    The only one way of really knowing if have unknown length request content is to have no CONTENT_LENGTH and check HTTP_TRANSFER_ENCODING for ‘chunked’. The only WSGI hosting mechanism I know of that supports that is Apache/mod_wsgi and even then you have to set the WSGIChunkedRequest directive to allow handling of chunked request content, given that it sits outside of the WSGI specification.

  4. Gustavo on 21 Jul 2010 at 9:54 pm #

    @Graham:

    Thanks for the note on chunked request content! I’ve just updated the slides.

    BTW, WebOb’s request wrapper sets CONTENT_LENGTH to “-1″ when people set the body of the request to a file-like object; if it’s a string, its length is used.

    Cheers.

  5. Dharmavirsinh Jhala on 10 Mar 2011 at 9:25 pm #

    Hi,

    Asking you a question about hosting, as read your past post about webfaction.com
    Your website is pretty fast do you still host it with webfaction.com?

    if not where?

    Kudos.

  6. Gustavo on 12 Mar 2011 at 6:19 pm #

    Hello, Dharmavirsinh.

    It’s hosted at Linode, which, by the way, I would highly recommend to anyone.

    HTH.

    – Gustavo.

« | »

  • About the author

    You're visiting the technical blog of Gustavo Narea, a Software Developer based in Oxford.