Downloader for the MetaHQ database stored on Zenodo.

Attributes:
  • doi (str) –

    Zenodo DOI for the MetaHQ databse.

  • outdir (str) –

    Path to the output directory in the user's system.

  • logger (Logger) –

    Logger for process transparency.

  • verbose (bool) –

    Indicates if logs should be passed to stdout.

Examples:

>>> from metahq_cli.downloader import Downloader
>>> downloader = Downloader('17663087')
>>> downloader.get()
>>> downloader.extract()

database_version property

Return the MetaHQ database version.

check_outdir_exists()

Check if the data directory exists.

extract()

Extract the tar archive.

get(num_retries=10)

Downloads the database .tar.gz file from Zenodo.

get_stats()

Check if file exists and retrieve file stats.