generate_download_buffer

generate_download_buffer(data_source: str, file_format: str) → Dict[source]

Transdorms a dataframe to a given fileformat as buffer, which can be used for flask.send_file

Parameters
  • data_source (str) – Name of the data source

  • file_format ("csv" | "xls) – Format the file should be downloaded in

Returns

dict containing the buffer, mimetype and filename

Return type

Dict