colour_datasets.utilities.url_download#
- colour_datasets.utilities.url_download(url: str, filename: str, md5: str | None = None, retries: int = 3) None[source]#
Download specified url and saves its content at specified file.
- Parameters:
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 specified url. If provided the saved content at specified 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.
- Return type:
None
Examples
>>> import os >>> url_download("https://github.com/colour-science/colour-datasets", os.devnull)