data.data package¶
Subpackages¶
Submodules¶
data.data.data module¶
Defines the class for handling data
-
class
data.data.data.Data¶ Bases:
objectRepresents a grouping of parameters with their provided data
-
add_value(value)¶ Adds the data value
Parameters: value ( data.data.value.DataValue) – The data value to add:raises
data.data.exceptions.InvalidData: If the value is a duplicate
-
add_value_from_output_data(input_name, output_name, output_data)¶ Adds an output value from the given output data to this data with the given input name. This is used to pass output data from a recipe node to the input data of another recipe node.
Parameters: - input_name (string) – The name of the input value to add
- output_name (string) – The name of the output value in the output data
- output_data (
data.data.data.Data) – The output data
:raises
data.data.exceptions.InvalidData: If the value is a duplicate or the key does not exist in the output data
-
validate(interface)¶ Validates this data against the given interface. Extra data values that cannot be passed to the interface will be removed.
Parameters: interface ( data.interface.interface.Interface) – The interface to which this data is being passedReturns: A list of warnings discovered during validation Return type: list():raises
data.data.exceptions.InvalidData: If the data is invalid
-
data.data.data_util module¶
-
data.data.data_util.get_file_ids(data)¶ Returns the file ids from a data object
Parameters: data ( data.data.data.Data) – The Data object to inspectReturns: A list of file ids Return type: [int]
-
data.data.data_util.get_parameter_names(data)¶ Returns the paramater names from a data object
Parameters: data ( data.data.data.Data) – The Data object to inspectReturns: A list of paramater names Return type: [string]
data.data.exceptions module¶
Defines exceptions that can occur when interacting with interface data values
-
exception
data.data.exceptions.InvalidData(name, description)¶ Bases:
util.exceptions.ValidationExceptionException indicating that the data is invalid
-
exception
data.data.exceptions.InvalidDataFilter(name, description)¶ Bases:
util.exceptions.ValidationExceptionException indicating that the data filter is invalid
data.data.value module¶
Defines the classes for handling a data value being passed to an interface
-
class
data.data.value.DataValue(name, param_type)¶ Bases:
objectRepresents a data value for an interface parameter
-
copy()¶ Returns a copy of this value
Returns: A copy of this value Return type: data.data.value.DataValue
-
validate(parameter)¶ Validates this data value against its parameter
Parameters: parameter ( data.interface.parameter.Parameter) – The parameter to which this data is being passedReturns: A list of warnings discovered during validation Return type: list():raises
data.data.exceptions.InvalidData: If the data is invalid
-
-
class
data.data.value.FileValue(name, file_ids)¶ Bases:
data.data.value.DataValueRepresents a data value containing one or more files
-
validate(parameter)¶
-
-
class
data.data.value.JsonValue(name, value)¶ Bases:
data.data.value.DataValueRepresents a JSON data value
-
validate(parameter)¶
-