I just recently started using Jinja2 for HTML templating on Google App Engine and love it.
I heard that the Django templating engine can be used for other formats so why not Jinja2?
Specifically, what I want to do is create stylesheet stubs for specific pages and dynamically combine them server-side.
Does anybody have experience with this?
Yes, you can do this.
If you want to have the result you generate cached on the client side and any proxies between you and them (such as Google’s) you can set a Cache-Control header in your response such as:
You can probably use zlib to generate a compressed version as well.
If you want to store the generated result so that you don’t have to re-generate (on a cache miss) you can store it in memcache (if less than 1MB) and you can store it in the blobstore using the new files API (experimental). You could actually serve it directly from the blobstore as well using a BlobstoreDownloadHandler.