kedro.context.load_context

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

Loads the KedroContext object of a Kedro Project as defined in src/<package-name>/run.py. This function will change the current working directory to the project path.

Parameters:
  • project_path (Union[str, Path]) – Path to the Kedro project.
  • kwargs – Optional custom arguments defined by users, which will be passed to
  • class in run.py. kwargs will need to be passed explicitly to (ProjectContext) –
  • constructor of ProjectContext. (the) –
Return type:

KedroContext

Returns:

Instance of KedroContext class defined in Kedro project.

Raises:
  • KedroContextError – Either ‘.kedro.yml’ was not found
  • or loaded context has package conflict.