silo.low_code.framework.result_container module
- class silo.low_code.framework.result_container.ResultContainer(result, **kwargs)
Bases:
object
The ResultContainer is the standard data interface for moving information between the steps. It is a pure data-class with no attached functions so its only purpose is to move information around.
Object properties are set with the following precedence:
Assigned as a keyword argument
Value from previous_result
- Variables
collection (Collection) – Collection associated with the ResultContainer
error_data (object) – Information for errors that occurred
metadata (dict) – Metadata associated with the collection.
name (str) – Name of the ResultContainer. If a name is not provided, a name will be generated as “<obj_id>.<did>”.
request_ids (list) – Request_ids for each step
result (object) – Result from the previous step or final result of the current step
execution (list) – List of steps that need to be executed to get the result
cache_info (dict) – Dictionary of step caching information
action_number (int) – Current index of the execution plan
indexing (str) – Index to help identify the request
max_iterations (int) – Maximum number of times RequestMoreData can be executed prior to exiting out of RequestMoreData mode.
rmd_data (OrderedDict) – Data related to RequestMoreData iterations. To avoid duplicating memory, rmd_data gets pushed into a nested dictionary. This allows us to pop the data out rather than having to clone and return, which results in memory duplication.
- Parameters
result (object) – Result to set for the container
name (str) – Name of the ResultContainer
metadata (dict) – Metadata associated with the collection.
error_data (object) – Information for errors that occurred
request_ids (list) – Request_ids for each step
collection (Collection) – Collection associated with the ResultContainer
previous_result (ResultContainer) – ResultContainer that should be use for attribute inheritance
indexing (str) – Index to help identify the request
max_iterations (int) – Maximum number of times RequestMoreData can be executed prior to exiting out of RequestMoreData mode.
rmd_data (OrderedDict) – Data related to RequestMoreData iterations
- Noindex
- action_number
- argument
- cache_info
- clear_rmd()
Clear out everything related to RequestMoreData and returns the value
- Return type
dict
- collection
- property credential
Lookup the credential assigned to the device
- Return type
dict
- property current_config
Return the configuration for the current step
- Return type
object
- property current_step_info
Return the step information for the current step. (step_name, step_config)
- Return type
tuple
- property current_step_name
Return the name for the current step
- Return type
str
- did
- error_data
- execution
- get_rmd()
Return the results of RequestMoreData
- Return type
dict
- property index
- indexing
- is_cache_step(action_num=None)
Determine if the current step is a caching step
- Return type
bool
- max_iterations
- metadata
- name
- property request_id
Return the current request_id based off action_number
- Returns
Request ID for current action number or None
- Return type
union[str,None]
- request_ids
- result
- rmd_data
- set_index(index)
Set the index for the result container
- Parameters
index (str) – Index when RequestMoreData is active
- status
- update_rmd()
Add the current result to RequestMoreData
- silo.low_code.framework.result_container.get_request_name(result_container, reg_info)
Create a key for a specific step with step arguments
- Parameters
result_container (ResultContainer) – Result that contains the previous request_id
reg_info (decorators.registered_step) – Information related to the step
- Returns
Key for the step execution
- Return type
str