doc = SimpleDocTemplate(pdf, pagesize=letter)
doc.build(story)
content = pdf.getvalue()
pdfStorage = PdfStorage(pdfContent=content)
pdfStorage.put()
handler.response.write(content)
How to save generated PDF with Reportlab to Datastore in App Engine Python