class documentation

class CLICommandSpecs: (source)

View In Hierarchy

Namespace that defines all specifications for Kedro CLI's lifecycle hooks.

Method after_command_run Hooks to be invoked after a CLI command runs. It receives the project_metadata as well as all command line arguments that were used, including the command and subcommand themselves and if the operation was successful or not.
Method before_command_run Hooks to be invoked before a CLI command runs. It receives the project_metadata as well as all command line arguments that were used, including the command and subcommand themselves.
@cli_hook_spec
def after_command_run(self, project_metadata: ProjectMetadata, command_args: List[str], exit_code: int): (source)

Hooks to be invoked after a CLI command runs. It receives the project_metadata as well as all command line arguments that were used, including the command and subcommand themselves and if the operation was successful or not.

Parameters
project_metadata:ProjectMetadataThe Kedro project's metadata.
command_args:List[str]The command line arguments that were used.
exit_code:intExit code raised by Click application after completion
@cli_hook_spec
def before_command_run(self, project_metadata: ProjectMetadata, command_args: List[str]): (source)

Hooks to be invoked before a CLI command runs. It receives the project_metadata as well as all command line arguments that were used, including the command and subcommand themselves.

Parameters
project_metadata:ProjectMetadataThe Kedro project's metadata.
command_args:List[str]The command line arguments that were used.