[Web-SIG] WSGI in standard library
ianb at colorstudy.com
Fri Feb 17 01:55:55 CET 2006
Bill Janssen wrote:
>>What would we be PEPing?
> Well, when we started, I made up a list of various things that seem to
> be missing in the standard library, like server-side support for
> SSL-encrypted socket connections.
Here's my thoughts on those:
- Real HTML parser
Really hard. Current state-of-the-art is maybe Tidy (sloppy),
Beautiful Soup (precise, but still not a tree structure), and some
parsers embedded in some template languages (ZPT and meld3 -- precise
and create a tree, but require quite well formed HTML). If the HTML 5
spec works out, I expect a quality parser can be written, but until that
happens it's just really hard.
- CSS Parser
I think John Lee has done some work on this? Beats me. I've never
felt any need for CSS parsing personally.
You mean like posting a file upload? I suppose current interfaces
don't stop you, but they don't make it easy. The email module will
probably help a lot with this. Maybe it could go in urllib, next to
- Asynchronous fetch
Not sure how this would work. What kind of async networking can we
do in a cross-platform manner?
- Connection caching
Seems somewhat complex. I'm not sure it is appropriate for the
standard library. Maybe httplib2 or another such project could take
this on, but it doesn't seem like a standard library task.
- Traffic monitor
Eh. Clark wrote an upload monitor as WSGI middleware, so that's a
kind of proof of concept. I would consider this doable enough with
WSGI, and it doesn't need any special support in the stdlib. On the
client side I really don't have a clear idea of the use case.
- Server-side SSL support
What is the current state of this? It's mostly there, isn't it?
- A standard server framework on the order of Medusa
Well, we have BaseHTTPServer, and now a WSGI based server.
- A standard interface to request data
We have this with WSGI. It's not a pretty request object, but it's
standardized. I think there's room for a standard object-like interface
to the WSGI environment (not comprehensive, but it doesn't need to be).
- Improved support for authentication
I haven't tried doing this in a long time, I'm not sure what the
- Explicit cookie handling
I guess I brought this one up? I'm not sure what I mean ;)
- Form value validation
I believe this is rather difficult, but not impossible.
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the Web-SIG