bundles / astropy 7.0.1 / astropy / utils / data / import_download_cache
function
astropy.utils.data:import_download_cache
source: /astropy/utils/data.py :2231
Signature
def import_download_cache ( filename_or_obj , urls = None , update_cache = False , pkgname = astropy ) Summary
Imports the contents of a ZIP file into the cache.
Extended Summary
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: str or file-likeWhere the stored ZIP file is. Must be something the zipfile module can read from.
urls: set of str or list of str or NoneThe URLs to import from the ZIP file. The default is all URLs in the file.
update_cache: bool, optionalIf 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`, optionalThe package name to use to locate the download cache. i.e. for
pkgname='astropy'the default cache location is~/.astropy/cache.
See also
- export_download_cache
export the contents the cache to of such a ZIP file
- import_file_to_cache
import a single file directly
Aliases
-
astropy.utils.data.import_download_cache