1

I am looking for a Python that can download and upload through SFTP and allow bandwidth throttling (e.g. max download speed: 10 MB/s).

pysftp can download and upload through SFTP but has no bandwidth throttling option as far as I know.

It should work on Windows 7 SP1 x64 Ultimate or Ubuntu 14.04.3 LTS x64.


Ideally I'd like to write something along the line of

import pysftp #pip install sftp
import sys

hostname = "128.65.45.12"
username = "bob"       
password = "123456"  

sftp = pysftp.Connection(hostname, username=username, password=password)

sftp.get('/data/word_vectors/GoogleNews-vectors-negative300.txt', max_speed=10)
print('done')
3

1 Answer 1

1

Paramiko supports this according to this StackOverflow answer: You can provide a custom callback to SFTPClient.put and SFTPClient.get that sleeps for however long is needed to achieve the desired throttling effect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.