astropy.utils.data.download_file(remote_url, cache=False, show_progress=True, timeout=None)[source]

Accepts a URL, downloads and optionally caches the result returning the filename, with a name determined by the file’s MD5 hash. If cache=True and the file is present in the cache, just returns the filename.

Parameters
remote_urlstr

cachebool, optional

Whether to use the cache

show_progressbool, optional

Whether to display a progress bar during the download (default is True). Regardless of this setting, the progress bar is only displayed when outputting to a terminal.

timeoutfloat, optional

The timeout, in seconds. Otherwise, use astropy.utils.data.Conf.remote_timeout.

Returns
local_pathstr