download_file_cached#, cache_name='ctapipe', auth=None, env_prefix='CTAPIPE_DATA_', default_url='', progress=False)[source]#

Downloads a file from a dataserver and caches the result locally in $HOME/.cache/<cache_name>. If the file is found in the cache, no new download is performed.

name: str or pathlib.Path

the name of the file, relative to the data server url

cache_name: str

What name to use for the cache directory

env_prefix: str

Prefix for the environt variables used for overriding the URL, and providing username and password in case authentication is required.

auth: True, None or tuple of (username, password)

Authentication data for the request. Will be passed to requests.get. If True, read username and password for the request from the env variables env_prefix + 'USER' and env_prefix + PASSWORD

default_url: str

The default url from which to download name, can be overridden by setting the env variable env_prefix + URL

path: pathlib.Path

the full path to the downloaded data.