queenbee.plugin.function module¶
Queenbee Function class.
- class queenbee.plugin.function.Function(*, type: ConstrainedStrValue = 'Function', annotations: Dict[str, Any] = None, inputs: List[Union[FunctionStringInput, FunctionIntegerInput, FunctionNumberInput, FunctionBooleanInput, FunctionFolderInput, FunctionFileInput, FunctionPathInput, FunctionArrayInput, FunctionJSONObjectInput]] = None, outputs: List[Union[FunctionStringOutput, FunctionIntegerOutput, FunctionNumberOutput, FunctionBooleanOutput, FunctionFolderOutput, FunctionFileOutput, FunctionPathOutput, FunctionArrayOutput, FunctionJSONObjectOutput]] = None, name: str, description: str = None, command: Optional[str] = None, language: ScriptingLanguages = ScriptingLanguages.Python, source: Optional[str] = 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: Optional[str]¶
- description: str¶
- inputs: List[Union[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[Union[FunctionStringOutput, FunctionIntegerOutput, FunctionNumberOutput, FunctionBooleanOutput, FunctionFolderOutput, FunctionFileOutput, FunctionPathOutput, FunctionArrayOutput, FunctionJSONObjectOutput]]¶
- source: Optional[str]¶
- 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