scitacean.typing.Downloader#
- class scitacean.typing.Downloader(*args, **kwargs)[source]#
Handler for file downloads.
Constructors
__init__
(*args, **kwargs)Methods
connect_for_download
(dataset, ...)Open a connection to the file server.
- __init__(*args, **kwargs)#
- connect_for_download(dataset, representative_file_path)[source]#
Open a connection to the file server.
- Parameters:
dataset (
Dataset
) – The dataset for which to download files.representative_file_path (
RemotePath
) – A path to a file that can be used to check whether files for this dataset are accessible. The transfer assumes that, if this path is accessible, all files for this dataset are.
- Returns:
AbstractContextManager
[DownloadConnection
] – A connection object that can download files.- Raises:
RuntimeError – If files for the given dataset cannot be downloaded based on
representative_file_path
.