Paths for Jupyter files

Specific directories

jupyter_core.paths.jupyter_config_dir()

Get the Jupyter config directory for this platform and user.

Returns JUPYTER_CONFIG_DIR if defined, else ~/.jupyter

jupyter_core.paths.jupyter_data_dir()

Get the config directory for Jupyter data files for this platform and user.

These are non-transient, non-configuration files.

Returns JUPYTER_DATA_DIR if defined, else a platform-appropriate path.

jupyter_core.paths.jupyter_runtime_dir()

Return the runtime dir for transient jupyter files.

Returns JUPYTER_RUNTIME_DIR if defined.

The default is now (data_dir)/runtime on all platforms; we no longer use XDG_RUNTIME_DIR after various problems.

Search paths

jupyter_core.paths.jupyter_config_path()

Return the search path for Jupyter config files as a list.

If the JUPYTER_PREFER_ENV_PATH environment variable is set, the environment-level directories will have priority over user-level directories.

If the Python site.ENABLE_USER_SITE variable is True, we also add the appropriate Python user site subdirectory to the user-level directories.

jupyter_core.paths.jupyter_path(*subdirs)

Return a list of directories to search for data files

JUPYTER_PATH environment variable has highest priority.

If the JUPYTER_PREFER_ENV_PATH environment variable is set, the environment-level directories will have priority over user-level directories.

If the Python site.ENABLE_USER_SITE variable is True, we also add the appropriate Python user site subdirectory to the user-level directories.

If *subdirs are given, that subdirectory will be added to each element.

Examples:

>>> jupyter_path()
['~/.local/jupyter', '/usr/local/share/jupyter']
>>> jupyter_path('kernels')
['~/.local/jupyter/kernels', '/usr/local/share/jupyter/kernels']