class documentation
class CLICommandSpecs: (source)
Namespace that defines all specifications for Kedro CLI's lifecycle hooks.
Method | after |
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 |
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:
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 | |
projectProjectMetadata | The Kedro project's metadata. |
commandList[ | The command line arguments that were used. |
exitint | Exit code raised by Click application after completion |
@cli_hook_spec
def before_command_run(self, project_metadata:
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 | |
projectProjectMetadata | The Kedro project's metadata. |
commandList[ | The command line arguments that were used. |