export_download_cache¶
-
astropy.utils.data.export_download_cache(filename_or_obj, urls=None, overwrite=False, pkgname='astropy')[source]¶ Exports the cache contents as a ZIP file.
Parameters: filename_or_obj : str or file-like
Where to put the created ZIP file. Must be something the zipfile module can write to.
urls : iterable of str or None
The URLs to include in the exported cache. The default is all URLs currently in the cache. If a URL is included in this list but is not currently in the cache, a KeyError will be raised. To ensure that all are in the cache use
download_fileordownload_files_in_parallel.overwrite : bool, optional
If filename_or_obj is a filename that exists, it will only be overwritten if this is True.
pkgname :
str, optionalThe package name to use to locate the download cache. i.e. for
pkgname='astropy'the default cache location is~/.astropy/cache.See also
import_download_cache- import the contents of such a ZIP file
import_file_to_cache- import a single file directly