download

Contents

download#

gaiaunlimited.fetch_utils.download(url, file, desc=None, chunk_size=1024, md5sum=None)#

Download file from a url.

Parameters:
  • url (str) – url string

  • file (file object) – file object to write the content to.

  • desc (str, optional) – Description of progressbar. Defaults to None.

  • chunk_size (int, optional) – Chunk size to iteratively update progrss and md5sum. Defaults to 1024.

  • md5sum (str, optional) – The expected md5sum to check against. Defaults to None.

Raises:

DownloadError – raised when md5sum differs.