[Web-SIG] WebOb

Guido van Rossum guido at python.org
Mon Oct 22 21:40:18 CEST 2007

2007/10/22, Ian Bicking <ianb at colorstudy.com>:
> > I briefly looked at the tutorial and was put off a little by the
> > interactive prompt style of the examples; that seems so unrealistic
> > that I wonder if it wouldn't be better to just say "put this in a file
> > and run it like this"?
> The side effect of doctesting is that docs sometimes look weird :-/

Personally, I find doctest a great tool for writing tests in certain
situations; not so great for writing docs though.

> I'm not sure what form the docs should take.  I'm open to suggestions.
> The extracted docs are actually reasonable as a reference, I think:
> http://pythonpaste.org/webob/class-webob.Request.html
> http://pythonpaste.org/webob/class-webob.Response.html

Hm, these are mostly alphabetical listings of individual methods and
properties. I'm still hoping for something that I can read from top to
bottom in 10 minutes and get an idea of what this is and how to use

> For realistic use cases, some kind of infrastructure is necessary.

How realistic are we talking? I'm thinking of something that I can
test by pointing my browser to localhost:8080 or similar. For CGI
scripts, the standard library's CGIHTTPServer would suffice. How hard
is it to create something similar for WSGI or for webob?

> I suppose a simple example using the wsgiref server and a plain WSGI app
> would suffice.  Even a very small framework (e.g.,
> http://svn.pythonpaste.org/Paste/apps/FlatAtomPub/trunk/flatatompub/dec.py)
> improves that considerably, but probably isn't worth introducing.

It's hard to judge that code since it has zero documentation. I was
more looking for something that has a main() which is called when
invoked as a script.

> >> A quick summary of differences in the API and some other
> >> request/response objects out there:
> >>    http://pythonpaste.org/webob/differences.html
> >> I'd include more frameworks, if you can point me to their
> >> request/response API documentation (e.g., I looked but couldn't find any
> >> for Zope 3).
> >
> > I'm not too familiar with other frameworks (having always hacked my
> > own, as it's so easy :-). Any chance of a summary that's not a
> > tutorial nor a reference?
> Did you look at the file serving example?
> http://pythonpaste.org/webob/file-example.html

Thatr's the first thing I looked at, and that prompted my comments above. :-)

> I suppose a quick summary would also be possible, covering just the most
> important attributes and with a quick listing of others (like all the
> properties for the individual HTTP headers).

Yes please.

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Web-SIG mailing list