Using Jinja2 From Twisted
txTemplate is simply a set of adapters for some popular templating engines like Clearsilver, Genshi and Jinja2 to give them a consistent deferred-returning API.  I originally hacked this up because I used Twisted and Genshi to replace a Webware and Kid application.

You can find the package here:

And the source for anyone interested in hacking on it is hosted on Github.

Assuming I remain interested in hacking on this future enhancements will be a better incremental interface for large template rendering.  The current API generates the template asynchronously but doesn’t provide a good way to write the response to clients in chunks, the assumption being that as long as you can buffer the template in memory you can chunk the response to the clients.  Also, if you don’t finish rendering the template before beginning to send it to the client it’s possible that the you’ll hit an error while rendering and send only a partial response.