push

Pipeline to push files to a server using SFTP.

pdm_utils.pipelines.push_db.get_files(directory, file, ignore)

Get the list of file(s) that need to be uploaded.

Parameters
  • directory – (optional) directory containing files for upload

  • file (pathlib.Path) – (optional) file to upload

  • ignore (set) – file(s) to ignore during upload process

Type

directory: pathlib.Path

Returns

file_list

pdm_utils.pipelines.push_db.main(unparsed_args)

Driver function for the push pipeline.

Parameters

unparsed_args (list) – the command-line arguments given to this pipeline’s caller (likely pdm_utils.__main__)

pdm_utils.pipelines.push_db.parse_args(unparsed_args)

Verify the correct arguments are selected for uploading to the server.

pdm_utils.pipelines.push_db.upload(sftp_client, destination, files)

Try to upload the file(s).

Parameters
  • sftp_client (paramiko.SFTPClient) – an open SFTPClient

  • destination (pathlib.Path) – remote file directory to upload to

  • files (list of pathlib.Path) – the file(s) to upload

Returns

successes, failures