get_file
- plasmapy.utils.data.downloader.get_file(basename, base_url='https://raw.githubusercontent.com/PlasmaPy/PlasmaPy-data/main/', directory=None)[source]
Download a file from a URL (if the file does not already exist) and return the full local path to the file.
- Parameters:
basename (str) – Name of the file to be downloaded (extension included).
base_url (str, optional) – The base URL of the file to be downloaded. Defaults to the root directory of PlasmaPy’s data repository.
directory (str, optional) – The full path to the desired download location. Defaults to the default PlasmaPy data download directory
plasmapy/utils/data/downloads/
.
- Returns:
path – The full local path to the downloaded file.
- Return type: