import_download_cache#
- astropy.utils.data.import_download_cache(filename_or_obj, urls=None, update_cache=False, pkgname='astropy')[source]#
Imports the contents of a ZIP file into the cache.
Each member of the ZIP file should be named by a quoted version of the URL whose contents it stores. These names are decoded with
unquote().- Parameters:
- filename_or_obj
stror file-like object Where the stored ZIP file is. Must be something the
zipfilemodule can read from.- urls
setofstrorlistofstrorNone The URLs to import from the ZIP file. The default is all URLs in the file.
- update_cachebool, optional
If True, any entry in the ZIP file will overwrite the value in the cache; if False, leave untouched any entry already in the cache.
- pkgname
str, optional The package name to use to locate the download cache. i.e. for
pkgname='astropy'the default cache location is~/.astropy/cache.
- filename_or_obj
See also
export_download_cacheexport the contents the cache to of such a ZIP file
import_file_to_cacheimport a single file directly