input_variable
Module to interact with Knowledge Model input variables.
This module contains class to interact with Package Manager input variables of a Knowledge Model.
Typical usage example:
input_variables = knowledge_model.get_variables()
input_variable = knowledge_model.get_variable(
"INPUT_VARIABLE_KEY"
)
input_variable.value_or_default
InputVariable ¶
Bases: InputVariableDefinitionTransportWithValue
Input variable object to interact with input variables of a knowledge model.
default_value
instance-attribute
¶
Default value of input variable. None if no default value is defined.
knowledge_model_id
instance-attribute
¶
Id of knowledge model where input variable is located.
value_or_default
class-attribute
instance-attribute
¶
from_transport
classmethod
¶
Creates high-level InputVariable object from given InputVariableDefinitionTransportWithValue.
Parameters:
-
client(Client) –Client to use to make API calls for given input variable.
-
knowledge_model_id(str) –Id of knowledge model where input variable is located.
-
input_variable_transport(InputVariableDefinitionTransportWithValue) –InputVariableDefinitionTransportWithValue object containing properties of input variable.
Returns:
-
InputVariable–An InputVariable object with properties from transport and given client.
sync ¶
Syncs input variable properties with EMS.
Raises:
-
PyCelonisNotFoundError–Raised if input variable no longer exists.