Invoker
InvokerLink
Define and manage invoker scripts in the Sierra Dev. Invoker scripts are used to execute specific actions in a controlled environment.
Invoker Example
sierra.invoker
Link
ClassesLink
InvokerScript
Link
A wrapper for creating Sierra invoker scripts that generates config.yaml and argparse-compatible scripts.
This class is used to define a script with its parameters, then generate: 1. A standalone Python script with argparse handling 2. A YAML configuration for Sierra 3. Proper JSON output formatting
ATTRIBUTE | DESCRIPTION |
---|---|
name |
The unique name of the script.
TYPE:
|
description |
A short description of the script.
TYPE:
|
params |
List of parameter metadata.
TYPE:
|
http_client |
Optional HTTP client used for external requests.
TYPE:
|
logger |
Logger instance for capturing script activity.
TYPE:
|
_entry_point |
The registered Python function.
TYPE:
|
_output_dir |
Directory to output generated files.
TYPE:
|
AttributesLink
FunctionsLink
verify_signature
staticmethod
LinkVerifies that all parameters are properly typed with SierraOption metadata. Raises TypeError if any parameter lacks SierraOption typing.
PARAMETER | DESCRIPTION |
---|---|
func
|
The function to verify.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
TypeError
|
If any parameter lacks proper SierraOption annotation. |
entry_point
LinkRegister a Python function as an invoker script.
This extracts parameter metadata and prepares the function for code generation.
PARAMETER | DESCRIPTION |
---|---|
func
|
The function to register.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
_TCallable
|
The original function (unchanged). |