colour_datasets.utilities.url_download(url: str, filename: str, md5: str | None = None, retries: int = 3)[source]#

Download given url and saves its content at given file.

  • url (str) – Url to download.

  • filename (str) – File to save the url content at.

  • md5 (str | None) – Message Digest 5 (MD5) hash of the content at given url. If provided the saved content at given file will be hashed and compared to md5.

  • retries (int) – Number of retries in case where a networking error occurs or the MD5 hash is not matching.


>>> import os
>>> url_download("", os.devnull)