ftps package

Submodules

ftps.ftps module

Python interface to FTPS using pycurl.

class ftps.ftps.FTPS(url, connect_timeout=5, max_retries=5)[source]

Bases: object

FTPS client based on pycurl.

Parameters:
  • url (str) – Server URL including authorization
  • connect_timeout (int) – Connection timeout in seconds
  • max_retries (int) – Maximum number of retry attempts
download(remote_filename, local_filename)[source]

Download remote file and save it locally.

Parameters:
  • remote_filename (str) – Path to remote file in server to download.
  • local_filename (str) – Path to local file to create to.
list(remote_dir=None)[source]

List files in remote directory.

Parameters:remote_dir (str) – Path to remote directory to get the file list.
perform()[source]

Perform operation with retries.

reset()[source]

Reset client.

This is useful after each operation to make sure the client options are set to its default state.

upload(local_filename, remote_filename)[source]

Upload local_filename to server.

Parameters:
  • local_filename (str) – Path to local file to upload.
  • remote_filename (str) – Path to remote file to create.

Module contents