pooch.SFTPDownloader#
- class pooch.SFTPDownloader(port=22, username='anonymous', password='', account='', timeout=None, progressbar=False)[source]#
Download manager for fetching files over SFTP.
When called, downloads the given file URL into the specified local file. Requires paramiko to be installed.
Use with
pooch.Pooch.fetch
orpooch.retrieve
to customize the download of files (for example, to use authentication or print a progress bar).- Parameters:
port (int) – Port used for the SFTP connection.
username (str) – User name used to login to the server. Only needed if the server requires authentication (i.e., no anonymous SFTP).
password (str) – Password used to login to the server. Only needed if the server requires authentication (i.e., no anonymous SFTP). Use the empty string to indicate no password is required.
timeout (int) – Timeout in seconds for sftp socket operations, use None to mean no timeout.
progressbar (bool or an arbitrary progress bar object) – If True, will print a progress bar of the download to standard error (stderr). Requires tqdm to be installed.
Methods Summary
SFTPDownloader.__call__
(url, output_file, pooch)Download the given URL over SFTP to the given output file.