Downloader
- class plasmapy.utils.data.downloader.Downloader( )[source]
Bases:
object
Accesses the PlasmaPy resource files.
Retrieves local paths to resource files, and downloads those files from PlasmaPy’s data repository if they cannot be found locally.
- Parameters:
directory (
Path
, optional) – The directory into which files will be downloaded. The default is/~//.plasmapy//downloads//
validate (
bool
, default:True
) – IfTrue
, verify that local files are up-to-date with the data repository, and use the GitHub API to verify download URLs before downloading files. IfFalse
, return any matching local file without verification and, if a local file cannot be found, attempt to download from the repository without validation.api_token (
str
, optional) – A GitHub authorization token that, if provided, will be used for queries to the GitHub API. If none is provided, public API calls will be used.
Methods Summary
get_file
(filename)Returns a local path to a resource file, downloading it if necessary.
Methods Documentation