deep.processor.variable_set_processor
Handle the processing of variables sets.
VariableCacheProvider
Variable cache provider.
Manage the caching of variables for a trigger context.
Source code in deep/processor/variable_set_processor.py
size
property
The number of variables we have cached.
__init__()
check_id(identity_hash_id)
Check if id is in the cache.
:param identity_hash_id: the identity hash to check :return: the internal id for this hash, or None if not set
Source code in deep/processor/variable_set_processor.py
new_var_id(identity_hash_id)
Create a new variable id from the hash id.
:param identity_hash_id: the hash id to map the new id to. :return: the new id
Source code in deep/processor/variable_set_processor.py
VariableProcessorConfig
Variable process config.
Source code in deep/processor/variable_set_processor.py
__init__(max_string_length=DEFAULT_MAX_STRING_LENGTH, max_variables=DEFAULT_MAX_VARIABLES, max_collection_size=DEFAULT_MAX_COLLECTION_SIZE, max_var_depth=DEFAULT_MAX_VAR_DEPTH)
Create a new config for the variable processing.
:param max_string_length: the max length of a string :param max_variables: the max number of variables :param max_collection_size: the max size of a collection :param max_var_depth: the max depth to process
Source code in deep/processor/variable_set_processor.py
VariableSetProcessor
Bases: Collector
Handle the processing of variables.
Source code in deep/processor/variable_set_processor.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
|
max_collection_size: int
property
Get the max size of a collection.
:return int: the configured value
max_string_length: int
property
Get the max length of a string.
:return int: the configured value
max_var_depth: int
property
Get the max depth to process.
:return int: the configured value
var_lookup
property
Get var look up.
__init__(var_lookup, var_cache, config=VariableProcessorConfig())
Create a new variable set processor.
:param var_lookup: the var lookup to use :param var_cache: the var cache to use :param config: the var process config to use
Source code in deep/processor/variable_set_processor.py
append_child(variable_id, child)
Append a chile to existing variable.
This is called when a child variable has been processed and the result should be attached to a variable that has already been processed.
:param str variable_id: the internal variable id of the parent variable :param VariableId child: the internal variable id value to attach to the parent
Source code in deep/processor/variable_set_processor.py
append_variable(var_id, variable)
Append a variable to the var lookup.
This is called when a variable has been processed
:param var_id: the internal id of the variable :param variable: the internal value of the variable
Source code in deep/processor/variable_set_processor.py
check_id(identity_hash_id)
Check if the identity_hash_id is known to us, and return the lookup id.
:param identity_hash_id: the id of the object :return: the lookup id used
Source code in deep/processor/variable_set_processor.py
check_var_count()
new_var_id(identity_hash_id)
Create a new cache id for the lookup.
:param identity_hash_id: the id of the object :return: the new lookup id
Source code in deep/processor/variable_set_processor.py
process_variable(name, value)
Process a variable name and value.
:param name: the variable name :param value: the variable value :return:
Source code in deep/processor/variable_set_processor.py
search_function(node)
Search for child variables using BFS.
This is the search function to use during BFS.
:param node: the current node we are process :return: True, if we want to continue with the nodes children