We have a large client-server based application based on twisted.  The application has grown to the point where we would like to add a REST-based API to the server side to allow for interfacing with a wider variety of client applications.  Over the weekend I started looking into twisted.web and had a couple of basic questions:<div>
<br></div><div>1) Is there any method to stream a large request (ex: PUT or POST with file upload) into the system or does the entire body have to be loaded into memory as part of the request?</div><div><br></div><div>2) Has anyone used an existing URL Routing system (ex: Routes [1], Selector [2]) and adapted it for use with Twisted?  (I know I could use the twisted preferred method of parent child hierarchies, but our application has a better fit with the route-based method used by Pylons, Django, Rails, etc)</div>
<div><br></div><div>3) Is there a document anywhere that describes all the environment variables the user can get from the request and how to get to them?  (something like the environ section of the WSGI PEP [3])</div><div>
<br></div><div>4) Are their any wrappers people have developed to make it a bit easier to use deferreds (in particular inlinecallbacks) in the handlers for twisted.web?  (I am considering just writing a wrapper myself that provides an interface similar to google app engine webapp [4] but wanted to check first so I don&#39;t reinvent something)</div>
<div><br></div><div>Thanks,</div><div>Allen</div><div><br></div><div><br></div><div>[1] <a href="http://routes.groovie.org/index.html">http://routes.groovie.org/index.html</a></div><div>[2] <a href="http://lukearno.com/projects/selector/">http://lukearno.com/projects/selector/</a></div>
<div>[3] <a href="http://www.python.org/dev/peps/pep-0333/#environ-variables">http://www.python.org/dev/peps/pep-0333/#environ-variables</a></div><div>[4] <a href="http://code.google.com/appengine/docs/python/tools/webapp/">http://code.google.com/appengine/docs/python/tools/webapp/</a></div>