So, I need to generate a CSV object just to POST it to an API (part of the script). I would prefer to avoid saving the file in the server storage (even if it's a temp file) before sending it in the request.
So far, I found the CSV file to upload is a <_io.TextIOWrapper name='file.csv' mode='r' encoding='cp1252'> type, but not sure how to generate it from a list of lists.
[
['HEADER1', HEADER2],
['value1', 'value2],
....
]
Any idea is appreciated!