Downloading ReportLab PDF with Flask - Python Downloading ReportLab PDF with Flask - Python flask flask

Downloading ReportLab PDF with Flask - Python


You can use Flask's send_file for serving files:

from Flask import send_filereturn send_file('test.pdf', as_attachment=True)

With as_attachment=True you can force the client to download the file instead of viewing it inside the browser.