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
Sierra Invoker Script.Link
The core InvokerScript class that developers use to define, annotate,
and register SIERRA invoker scripts. Supports V1 (batch) and V2 (streaming)
protocols, STRING, FILE, and IMAGE parameter types, and
PRIMARY + MANDATORY option flags.
Usage
| Text Only | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 | |
Text Only 1 Parameters
| Text Only | |
|---|---|
1 | |
| Text Only | |
|---|---|
1 2 3 4 5 6 | |
ClassesLink
InvokerScript
Link
InvokerScript(name: str, description: str | None = None, protocol: typing.Literal['V1', 'V2'] = 'V1')
Typed invoker script wrapper for building SIERRA canvas integrations.
Generates config.yaml entries and standalone argparse-compatible
Python scripts from annotated function signatures.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Unique identifier for the invoker. Must be a valid Python identifier (lowercase + underscores recommended).
TYPE:
|
description
|
Brief description shown in the SIERRA canvas context menu.
TYPE:
|
protocol
|
Execution protocol:
-
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
name |
The unique name of the script.
TYPE:
|
description |
A short description of the script.
TYPE:
|
protocol |
The execution protocol version.
TYPE:
|
params |
List of extracted parameter metadata.
TYPE:
|
deps |
List of registered dependency functions.
TYPE:
|
requirements |
List of pip package requirements. |
command |
The generated CLI command template.
TYPE:
|
filename |
Path to the source file containing the entry point. |
AttributesLink
FunctionsLink
verify_signature
staticmethod
LinkVerify that function parameters are valid for invoker generation.
Rejects *args and **kwargs — all parameters must be named.
| PARAMETER | DESCRIPTION |
|---|---|
func
|
The function to verify.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
If variadic parameters are found. |
entry_point
LinkRegister a Python function as the invoker's entry point.
Extracts parameter metadata from the function signature and
docstring. Supports both Annotated[T, SierraOption] and
plain type annotations.
| PARAMETER | DESCRIPTION |
|---|---|
func
|
The function to register.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Callable
|
The original function (unmodified). |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the function has no parameters. |
TypeError
|
If variadic parameters are found. |
dependancy
LinkRegister a dependency function that will be inlined into the compiled standalone script.
| PARAMETER | DESCRIPTION |
|---|---|
func
|
The dependency function.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Callable
|
The original function (unmodified). |
requirement
Link