dgl.data.utils.download

dgl.data.utils.download(url, path=None, overwrite=False, sha1_hash=None, retries=5, verify_ssl=True)[source]

Download a given URL.

Codes borrowed from mxnet/gluon/utils.py

Parameters:
  • url (str) – URL to download.
  • path (str, optional) – Destination path to store downloaded file. By default stores to the current directory with the same name as in url.
  • overwrite (bool, optional) – Whether to overwrite the destination file if it already exists.
  • sha1_hash (str, optional) – Expected sha1 hash in hexadecimal digits. Will ignore existing file when hash is specified but doesn’t match.
  • retries (integer, default 5) – The number of times to attempt downloading in case of failure or non 200 return codes.
  • verify_ssl (bool, default True) – Verify SSL certificates.
Returns:

The file path of the downloaded file.

Return type:

str