pygmtools.utils.download

pygmtools.utils.download(filename, url, md5=None, retries=5)[source]

Check if content exits. If not, download the content to <user cache path>/pygmtools/<filename>. <user cache path> depends on your system. For example, on Debian, it should be $HOME/.cache.

Parameters
  • filename – the destination file name

  • url – the url

  • md5 – (optional) the md5sum to verify the content. It should match the result of md5sum file on Linux.

  • retries – (default: 5) max number of retries

Returns

the full path to the file: <user cache path>/pygmtools/<filename>