queenbee.plugin.function module¶
Queenbee Function class.
- class queenbee.plugin.function.Function(*, type: ConstrainedStrValue = 'Function', annotations: Dict[str, Any] = None, inputs: List[FunctionStringInput | FunctionIntegerInput | FunctionNumberInput | FunctionBooleanInput | FunctionFolderInput | FunctionFileInput | FunctionPathInput | FunctionArrayInput | FunctionJSONObjectInput] = None, outputs: List[FunctionStringOutput | FunctionIntegerOutput | FunctionNumberOutput | FunctionBooleanOutput | FunctionFolderOutput | FunctionFileOutput | FunctionPathOutput | FunctionArrayOutput | FunctionJSONObjectOutput] = None, name: str, description: str = None, command: str | None = None, language: ScriptingLanguages = ScriptingLanguages.Python, source: str | None = None)[source]¶
Bases:
IOBase
A Function with a single or a script.
- classmethod check_either_source_or_command(values)[source]¶
Validate either source or command is provided
- command: str | None¶
- description: str¶
- inputs: List[FunctionStringInput | FunctionIntegerInput | FunctionNumberInput | FunctionBooleanInput | FunctionFolderInput | FunctionFileInput | FunctionPathInput | FunctionArrayInput | FunctionJSONObjectInput]¶
- property is_script¶
Returns True if this Function is a script function.
- language: ScriptingLanguages¶
- name: str¶
- outputs: List[FunctionStringOutput | FunctionIntegerOutput | FunctionNumberOutput | FunctionBooleanOutput | FunctionFolderOutput | FunctionFileOutput | FunctionPathOutput | FunctionArrayOutput | FunctionJSONObjectOutput]¶
- source: str | None¶
- type: ConstrainedStrValue¶
- static validate_referenced_values(input_names: List[str], variables: List)[source]¶
Validate referenced values
- Parameters:
reference (input_names {List[str]} -- A list of acceptable names to)
strings (variables {List} -- A list of referenced value)
- Raises:
ValueError – One of the reference variables is invalid