download

TODO: handle parallel downloads

Module Contents

download.download_with_archive(url, credentials=None)

Downloads file. Checks before downloading if file is already in local esgf archive.

download.download(url, use_file_url=False, credentials=None)

Downloads url and returns local filename.

Parameters:
  • url – url of file
  • use_file_url – True if result should be a file url “file://”, otherwise use system path.
  • credentials – path to credentials if security is needed to download file
Returns:

downloaded file with either file:// or system path

download.wget(url, use_file_url=False, credentials=None)

Downloads url and returns local filename.

TODO: refactor cache handling.

Parameters:
  • url – url of file
  • use_file_url – True if result should be a file url “file://”, otherwise use system path.
  • credentials – path to credentials if security is needed to download file
Returns:

downloaded file with either file:// or system path

download.download_files(urls=list, credentials=None, monitor=None)
download.download_files_from_thredds(url, recursive=False, monitor=None)
class download.DownloadManager(monitor=None)
show_status(message, progress)
threader()
download_job(url, credentials)
download(urls, credentials=None)