miblab.zenodo_fetch#
- miblab.zenodo_fetch(dataset: str, folder: str, doi: str | None = None, filename: str | None = None, extract: bool = False, verbose: bool = False)[source]#
Download a dataset from Zenodo.
Note if a dataset already exists locally it will not be downloaded again and the existing file will be returned.
- Parameters:
dataset (str) – Name of the dataset
folder (str) – Local folder where the result is to be saved
doi (str, optional) – Digital object identifier (DOI) of the Zenodo repository where the dataset is uploaded. If this is not provided, the function will look for the dataset in miblab’s own Zenodo repositories.
filename (str, optional) – Filename of the downloaded dataset. If this is not provided, then dataset is used as filename.
extract (bool) – Whether to automatically extract downloaded ZIP files.
verbose (bool) – If True, prints logging messages.
- Raises:
NotImplementedError – If miblab is not installed with the data option.
requests.exceptions.ConnectionError – If the connection to Zenodo cannot be made.
- Returns:
Full path to the downloaded datafile.
- Return type: