import_download_cache#, 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().

filename_or_objstr or file-like object

Where the stored ZIP file is. Must be something the zipfile module can read from.

urlsset of str or list of str or None

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.

pkgnamestr, optional

The package name to use to locate the download cache. i.e. for pkgname='astropy' the default cache location is ~/.astropy/cache.

See also


export the contents the cache to of such a ZIP file


import a single file directly