kedro.framework.cli.get_project_context

kedro.framework.cli.get_project_context(key='context', project_path=None, **kwargs)[source]

Gets the context value from context associated with the key.

Parameters
  • key (str) – Optional key to get associated value from Kedro context. Supported keys are “verbose” and “context”, and it defaults to “context”.

  • project_path (Optional[Path]) – Optional path to where the project root is to load the context. If omitted, the current working directory will be used.

  • kwargs – Optional custom arguments defined by users, which will be passed into the constructor of the projects KedroContext subclass.

Return type

Any

Returns

Requested value from Kedro context dictionary or the default if the key

was not found.

Raises

KedroCliError – When the key is not found and the default value was not specified.