kedro.framework.cli.get_project_context

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

Gets the context value from context associated with the key.

Parameters:
  • key (str) – Optional key to get associated value from Kedro context.
  • keys are "verbose" and "context", and it defaults to "context". (Supported) –
  • kwargs – Optional custom arguments defined by users, which will be passed into
  • constructor of the projects KedroContext subclass. (the) –
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.