pysftp
A friendly face on SFTP
A friendly face on SFTP
To install this package, run one of the following:
A simple interface to SFTP. The module offers high level abstractions and task based routines to handle your SFTP needs. Checkout the Cook Book, in the docs, to see what pysftp can do for you.
::
import pysftp
with pysftp.Connection('hostname', username='me', password='secret') as sftp:
with sftp.cd('public') # temporarily chdir to public
sftp.put('/my/local/filename') # upload file to public/ on remote
sftp.get_r('myfiles', '/backup') # recursively copy myfiles/ to local
Tested on Python 2.7, 3.2, 3.3
.. image:: https://drone.io/bitbucket.org/dundeemt/pysftp/status.png :target: https://drone.io/bitbucket.org/dundeemt/pysftp/latest :alt: Build Status
Believed to support Python 3.4
0.2.8 (current, released 2014-05-28)
pysftp.walktree for walking local directories.pysftp.Connection.walktree to allow it to do another trick.put_d to put the contents of a local directory to a remote onepysftp.Connection.cd.put_r to recursively put the contents of a local directory to a remote one.st_mode_to_int on py3 (#52).listdir_attr now returns a sorted list, sorted on filenamepysftp.cd with-context version of os.chdir for local directories0.2.7 (current, released 2014-05-24)
pysftp.Connection.walktree, recursively walk, depth first, a remote directory structure. Used as the base of .get_r. See tests/test_walktree.py for examples..unlink as synonym for .remove.normalize.get_r to recursively copy remote directories to a local path.pwd to return the current working directory.cwd as synonym for .chdir.listdir to return a sorted list instead of an arbitrary one.readlink, always returns an absolute path.get_d to copy the remote directory to a local path (non-recursive).timeout to set the read/write timeout of the underlying channel for pending read/write ops.listdir_attr, wrapper for paramiko method.truncate, method returns the new file size0.2.6 (released 2014-05-17)
preserve_mtime parameter to .put, optionally updates the remote file's st_mtime to match the local file.preserve_mtime parameter to .get, optionally updates the local file's st_mtime to match the remote file.exists and .lexists, use .stat and .lstat respectively.symlink.isdir, .isfile, .makedirs.chmod.chown.sftp_client which exposes underlying, active SFTPClient object for advance use0.2.5 (released 2014-05-15)
ciphers parameter to .Connection object.active_ciphers to return local and remote cipher in use.security_options, where you can get available ciphers, among other information0.2.4 (released 2014-05-13)
.Connection can be used in a with statement.remove.put.get.openparamiko.AgentKey to be passed in as the private_key for Connection.mkdir.rmdir.stat and .lstat.st_mode_to_int,to convert the st_mode value back into a common integer representation.getfo.putfo0.2.3 (released 2014-05-10)
0.2.2
additions
Summary
A friendly face on SFTP
Information Last Updated
Mar 25, 2025 at 16:24
License
BSD
Total Downloads
92
Platforms