Skip to main content
`Ctrl`+`K`

# get_pkg_data_path

astropy.utils.data.get_pkg_data_path(*path, package=None)

  Get path from source-included data directories.

  Parameters:
    *path `python:str`

      Name/location of the desired data file/directory. May be a tuple of strings for `os.path` joining.

    package `python:str` or `python:None`, optional, keyword-only

      If specified, look for a file relative to the given package, rather than the calling module’s package.

  Returns:
    path `python:str`

      Name/location of the desired data file/directory.

  Raises:
    `ImportError`

      Given package or module is not importable.

    `RuntimeError`

      If the local data file is outside of the package’s tree.