You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, it would be really useful for us if accounting_api.get_invoice_as_pdf could return the PDF as bytes, instead of saving the file to /tmp/. At the moment our code looks roughly like:
filepath = accounting_api.get_invoice_as_pdf(tenant_id, invoice_id=uuid)
with open(filepath, 'rb') as f:
pdf_bytes = f.read()
os.remove(filepath)
return pdf_bytes
And would be nice if we could instead do something like:
Hi, it would be really useful for us if
accounting_api.get_invoice_as_pdf
could return the PDF as bytes, instead of saving the file to/tmp/
. At the moment our code looks roughly like:And would be nice if we could instead do something like:
To avoid fetching the PDF, saving it to file, reading the file, deleting the file and then returning the bytes.
The text was updated successfully, but these errors were encountered: