glasspy package

Subpackages

Submodules

glasspy.utils module

glasspy.utils.get_from_zenodo(ID, filename, savepath, verbose=True)

Download a single file from a Zenodo repository.

Skips the download if the file already exists at the given path. Files are streamed in chunks to handle large downloads efficiently.

Parameters:
  • ID (str or int) – Zenodo record ID. Found in the record’s URL, e.g., zenodo.org/records/1234567 → ID is 1234567.

  • filename (str) – Name of the file to download from the record.

  • savepath (str or Path) – Local path where the file will be saved.

  • verbose (bool, optional) – If True, prints progress messages during the download. Defaults to True.

Returns:

Returns immediately without downloading if the file already exists

at savepath.

Return type:

None

Raises:
  • requests.exceptions.HTTPError – If the HTTP request to Zenodo returns an error status code.

  • StopIteration – If no file matching filename is found in the record.

Module contents

glasspy.initial_config()