1import ftplib
2session = ftplib.FTP('server.address.com','USERNAME','PASSWORD')
3file = open('kitten.jpg','rb') # file to send
4session.storbinary('STOR kitten.jpg', file) # send the file
5file.close() # close file and FTP
6session.quit()
7