self.response.headers['Content-Type'] = 'multipart/x-zip'
self.response.headers['Content-Disposition'] = 'attachment; filename=test.zip'
self.response.out.write(output.getvalue())
Zipping dynamic files in App Engine (Python)