Skip to main content
`Ctrl`+`K`

# get_cached_urls

astropy.utils.data.get_cached_urls(pkgname='astropy', *, on_missing='warn')

  Get the list of URLs in the cache. Especially useful for looking up what files are stored in your cache when you don’t have internet access.

  The listed URLs are the keys programs should use to access the file contents, but those contents may have actually been obtained from a mirror. See `download_file` for details.

  Parameters:
    pkgname `str`, optional

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

    on_missing‘ignore’, ‘warn’, or ‘error’

      What to do if the cache directory doesn’t exist. Default: ‘warn’

      Added in version 8.0.

  Returns:
    cached_urls `python:list`

      List of cached URLs.

  See also

  `cache_contents`

    obtain a dictionary listing everything in the cache