download_from_doi

lumicks.pylake.download_from_doi

download_from_doi(doi, target_path='', force_download=False, show_progress=True)

Download files from a Zenodo DOI (i.e. 10.5281/zenodo.#######)

Note

This function will not re-download files that have already been downloaded. You can therefore safely use it at the start of a notebook or script without worrying that it will download files unnecessarily.

Parameters:
  • doi (str) – DOI of the files to download.

  • target_path (str) – Target path to download to. Default downloads to current folder.

  • force_download (bool) – Force re-downloading the file even if it already exists and the hash checks out. When the hash of an existing file does not match, this will overwrite the existing file with a freshly downloaded copy.

  • show_progress (bool) – Show a progress bar while downloading.

Returns:

List of downloaded file names.

Return type:

list of str