Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Durable SFTP connections

Project description


A durable extension the pysftp SFTP client:


pip install durasftp

Command Line Usage

Show the help:

python -m durasftp --help

Mirror an SFTP endpoint to your local with private keys:

python -m durasftp --host --port 22 --username your_username \
  --private-key ~/.ssh/id_rsa --private-key-pass 'ULTRASECUREPASSWORD' \
  --local-base /tmp/local_copy_of_server

Mirror an SFTP endpoint to your local with a password:

python -m durasftp --host --port 22 --username your_username \
  --local-base /tmp/local_copy_of_server

Package Usage

This package very closely mirrors the functionality of pysftp, except it automatically recovers a connection in the event that network connectivity is intermittent.

It also introduces a mirroring functionality, where you can copy a local directory to a remote server, or copy a remote directory to the local. It will ignore files that already exist on the destination, if the file size and modification time are identical.

Basic Usage

The DurableSFTPConnection class is intended to be a drop-in replacement for the pysftp.Connection class. With a stable network connection, it should be identical in every way.

from durasftp import DurableSFTPConnection

conn = DurableSFTPConnection(host="", port=22, username="your_username", password="ULTRASECUREPASSWORD")

Mirror from remote server to local

from durasftp import Mirrorer

mirrorer = Mirrorer(

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for durasftp, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size durasftp-1.0.0-py3-none-any.whl (21.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size durasftp-1.0.0.tar.gz (20.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page