decorator_interface#
- utils.decorator_interface.cli_wrapper(description, schema_file, script_name)[source]#
DESCRIPTION:
This function provides a decorator to be used as a generic interface for the command-line interface (CLI) functions.
- Parameters:
- description:
str A Python string specifying the helper function script description.
- schema_file:
str A Python string specifying the path to the YAML-formatted file containing the caller script CLI schema attributes.
- script_name:
str A Python string specifying the name of the caller script.
- description:
- Returns:
- decorator:
Callable A Python decorator.
- decorator:
- Return type:
Callable
- utils.decorator_interface.msg_except_handle(err_cls)[source]#
DESCRIPTION:
This function provides a decorator to be used to raise specified exceptions.
- Parameters:
- err_cls:
Generic A Python Generic object containing the Error subclass to be used for exception raises.
- err_cls:
- Returns:
- decorator:
Callable A Python decorator.
- decorator:
- Return type:
Callable
- utils.decorator_interface.privatemethod(member)[source]#
DESCRIPTION:
This function provides a decorator to be used to designate private methods within classes.
- Parameters:
- member:
Generic A Python Generic object containing the respective base-class within which the respective private method exists.
- member:
- Returns:
- decorator:
Callable A Python decorator.
- decorator:
- Return type:
Callable
- utils.decorator_interface.script_wrapper(script_name)[source]#
DESCRIPTION:
This function provides a decorator to be used for running a driver script (e.g., main()) .
- Parameters:
- script_name:
str A Python string specifying the name of the caller script.
- script_name:
- Returns:
- decorator:
Callable A Python decorator.
- decorator:
- Return type:
Callable