eradiate.data.BlindOnlineDataStore#
- class eradiate.data.BlindOnlineDataStore(base_url, path, attempts=3)[source]#
Bases:
DataStore
Serve data downloaded from a remote source without integrity check.
- Parameters:
- Fields:
- fetch(filename, downloader=None)[source]#
Fetch a file from the data store. This method wraps
pooch.retrieve()
and automatically selects compressed files when they are available.- Parameters:
filename (path-like) – File name to fetch from the local storage, relative to the storage root.
downloader (
callable()
, optional) – A callable that will be called to download a given URL to a provided local file name. This is mostly useful to display progress bars during download.
- Returns:
path (
Path
) – Absolute path where the retrieved resource is located.
Notes
If a compressed resource exists, it will be served automatically. For instance, if
"foo.nc"
is requested and"foo.nc.gz"
is registered, the latter will be downloaded, decompressed and served as"foo.nc"
.
- purge(keep=None)[source]#
Purge local storage location. The default behaviour is very aggressive and will wipe out the entire directory contents.
- Parameters:
keep (
str
orlist
ofstr
, optional) – A list of exclusion rules (paths relative to the store’s local storage root, shell wildcards allowed) defining files which should be excluded from the purge process.
Warning
This is a destructive operation, make sure you know what you’re doing!
- property registry#
Raises
NotImplementedError
(this data store has no registry).