meltano.edk.extension.ExtensionBase
- class meltano.edk.extension.ExtensionBase
Basic extension interface that must be implemented by all extensions.
- abstract describe() Describe
Describe method.
This method should describe what commands & capabilities the extension provides.
- Returns:
A description of the extension.
- Return type:
Description
- describe_formatted(output_format: DescribeFormat = DescribeFormat.text) str
Return a formatted description of the extensions commands and capabilities.
- Parameters:
output_format – The output format to use.
- Returns:
The formatted description.
- Return type:
str
- initialize(force: bool = False) None
Initialize the extension.
This method is called on-demand by the user to initialize the extension. Extensions are not required to implement this method, and may no-op.
- Parameters:
force – If True, force initialization.
- abstract invoke(command_name: str | None, *command_args: Union[str, bytes]) None
Invoke method.
This method is called when the extension is invoked.
- Parameters:
command_name – The name of the command to invoke.
*command_args – The arguments to pass to the command.
- pass_through_invoker(logger: BoundLogger, *command_args: Union[str, bytes]) None
Pass-through invoker.
This method is used to invoke the wrapped CLI with arbitrary arguments. Note this method will hard exit the process if an unhandled exception is encountered.
- Parameters:
logger – The logger to use in the event an exception needs to be logged.
*command_args – The arguments to pass to the command.
- post_invoke(invoked_name: str | None, *invoked_args: Union[str, bytes]) None
Called after the extension is invoked.
- Parameters:
invoked_name – The name of the command that was invoked.
*invoked_args – The arguments passed to the command that was invoked.
- pre_invoke(invoke_name: str | None, *invoke_args: Union[str, bytes]) None
Called before the extension is invoked.
- Parameters:
invoke_name – The name of the command that will be passed to invoke.
*invoke_args – The arguments that will be passed to invoke.