# use FTP's STOR command to upload the dataįtp.storbinary(f"STOR ). With ftplib.FTP(FTP_HOST, FTP_USER, FTP_PASS, encoding="utf-8") as ftp: # get FTP connection details from app settings Product_csv = product_list.to_csv(index=False)ĭatatosend = io.BytesIO(product_csv.encode('utf-8')) Product_list = pandas.DataFrame(products) # convert the SQL data to comma separated text ('Python HTTP trigger function processed a request.') To write data to an FTP server, we can use the built-in library ftplib in Python.ĭef main(everyDayAt5AM: func.TimerRequest, products: func.SqlRowList) -> func.HttpResponse:
0 Comments
Leave a Reply. |