kedro.framework.context.load_context(project_path, **kwargs)[source]

Loads the KedroContext object of a Kedro Project. This is the default way to load the KedroContext object for normal workflows such as CLI, Jupyter Notebook, Plugins, etc. It assumes the following project structure under the given project_path:

    |__ <src_dir>
    |__ pyproject.toml

The name of the <scr_dir> is src by default. The pyproject.toml file is used for project metadata. Kedro configuration should be under [tool.kedro] section.

  • project_path (Union[str, Path]) – Path to the Kedro project.

  • kwargs – Optional kwargs for KedroContext class.

Return type



Instance of KedroContext class defined in Kedro project.


KedroContextErrorpyproject.toml was not found or the [tool.kedro] section is missing, or loaded context has package conflict.