compass.io.download

compass.io.download(url, dest_path, config, exceptions=True)[source]

Download a file from a URL to the given path or path name

Parameters:
  • url (str) – The URL (including file name) to download

  • dest_path (str) – The path (including file name) where the downloaded file should be saved

  • config (compass.config.CompassConfigParser) – Configuration options used to find custom paths if dest_path is a config option

  • exceptions (bool, optional) – Whether to raise exceptions when the download fails

Returns:

dest_path (str) – The resulting file name if the download was successful, or None if not