My question is How can I send a CSV file to an FTP server. As you can see, the following script is the current code of mine:
Code sample:
def downloa
Write the CSV file to an in-memory file-like object (e.g. BytesIO) and upload that:
from ftplib import FTP
from io import BytesIO
import csv
flo = BytesIO()
writer = csv.writer(flo, delimiter=';')
writer.writerow(...)
ftp = FTP('ftp.example.com')
ftp.login('username', 'password')
flo.seek(0)
ftp.storbinary('STOR test.csv', flo)