Package: gocept.sftpcopy
sftpcopy allows to copy files to or from a remote server – integrates withgocept.filestore.
sftpcopy will take files from thenewdirectory, copy
them to the remote server and put them intocuron success. Likewise it will
download files from the remote server and put them into thenewdirectory for another application to pick it up.UsageYou can either give the name of a configuration file on the commandline, or
pass the configuration values as a dict directly to the entrypoint (useful for
buildout integration). The configuration file has the following format:[general]
mode = upload # or download
logfile = /path/to/logfile # defaults to stdout if not given
buffer_size = 65536
skip_files =
    name_of_file_to_skip_1
    name_of_file_to_skip_2

[local]
path = /path/on/local/machine

[remote]
path = /path/on/remote/machine
hostname = remote.host
port = 22
username = user
password = secretThe configdict uses the following keys instead:logfilebuffer_size (default: 65536, i.e. 64 KiB)keepalive_interval (default: 5 seconds)local_pathremote_pathhostnameportusernamepasswordkey_filenameskip_fileskey_filename takes precedence over password. If key_filename ends withdsa,
it’s assumed to be a DSA key, else an RSA key. Note that the key file must not
be password protected.skip_filesis a list of filenames (local or remote), which are skipped during
upload or download.Files are copied in chunks of buffer_size to avoid loading big files into
memory at once.You can also use sftpcopy as a python object like this:import gocept.sftpcopy
sftp = gocept.sftpcopy.SFTPCopy(
    '/path/on/local/machine',
    'remote.host', 22, 'user', 'secret', '/path/on/remote/machine',
    skip_files=['my_file_to_ignore'])
sftp.connect()
sftp.uploadNewFiles()  # or sftp.downloadNewFiles()Changelog2.0 (2020-06-18)Backward incompatible changesRemove AMQP integration. If you need AMQP integration, stick to using a
version < 1.0.Other changesAdd support for Python 3.7 and 3.8.Migrate to Github.InfoVersion 1.0 was in internal release, so omitting it here.0.6.0 (2016-11-02)Pinning version numbers of dependencies for tests.Migrate to py.test as testrunner.Add newskip_filesparameter to skip upload or download of files.0.5.1 (2015-04-15)Updatebootstrap.pyto version fromzc.buildout 2.3.0.Move repository tobitbucket.org.0.5.0 (2014-11-26)Set up keep-alive checking.0.4.1 (2014-03-07)Fixed brown-bag release.0.4.0 (2014-03-07)Copy files in chunks instead of loading each complete file into memory.
There is a new config optionbuffer_sizewhich defaults to 64 kB.0.3.0 (2014-02-20)Support key-based authentication.Check that the size of the transmitted file after up/download matches what
was transferred.0.2.2 (2012-04-04)Update to gocept.amqprun-0.8.0.2.1 (2012-03-29)Make amqp server configurable for tests.Clean up garbage connections left by tests (#10634).0.2 (2012-02-22)Addgocept.amqprunintegration.0.1.4 (2009-11-16)Log errors that occur while connecting0.1.3 (2008-02-27)Addedconfigdictargument to main function for easier buildout
integration.0.1.2 (2008-02-18)Fixed bug in connection logging.Remember filestore so we can actually upload/download.Did some testing predefined user.0.1.1 (2007-11-13)Fixed brown back release 0.1 which was not usable at all since there were
various files missing in the archive.