Skip to content

Functions:

get_pkg_cache_dir

get_pkg_cache_dir(subdir=PKG_NAME)

Returns a subdirectory under the user's cache directory

Parameters:

  • subdir (str, default: PKG_NAME ) –

    subdirectory name

Returns:

  • str

    path to subdir in the user's cache directory

Source code in src/python_pkg_tmpl/tmpl_module.py
 9
10
11
12
13
14
15
16
17
18
def get_pkg_cache_dir(subdir: str = PKG_NAME) -> str:
    """Returns a subdirectory under the user's cache directory

    Parameters:
        subdir: subdirectory name

    Returns:
        path to subdir in the user's cache directory
    """
    return join(user_cache_dir(), subdir)