World's Best AI Learning Platform with profoundly Demanding Certification Programs
Designed by IITians, only for AI Learners.
Designed by IITians, only for AI Learners.
New to InsideAIML? Create an account
Employer? Create an account
Download our e-book of Introduction To Python
4.5 (1,292 Ratings)
559 Learners
Neha Kumawat
a year ago
pip install pysftp
import pysftp
with pysftp.Connection('hostname', username='me', password='secret') as sftp:
with sftp.cd('/allcode'): # temporarily chdir to allcode
sftp.put('/pycode/filename') # upload file to allcode/pycode on remote
sftp.get('remote_file') # get a remote file