robot.variables package
Implements storing and resolving variables.
This package is mainly for internal usage, but utilities for finding variables can be used externally as well.
Submodules
robot.variables.assigner module
robot.variables.evaluation module
robot.variables.filesetter module
- class robot.variables.filesetter.VariableFileSetter(store: VariableStore)[source]
Bases:
object
robot.variables.finders module
- class robot.variables.finders.EmptyFinder[source]
Bases:
object
- identifiers = '$@&'
- empty = NormalizedDict({'${EMPTY}': '', '&{EMPTY}': {}, '@{EMPTY}': ()})
- class robot.variables.finders.InlinePythonFinder(variables)[source]
Bases:
object
- identifiers = '$@&'
robot.variables.notfound module
robot.variables.replacer module
- class robot.variables.replacer.VariableReplacer(variables)[source]
Bases:
object
- replace_list(items, replace_until=None, ignore_errors=False)[source]
Replaces variables from a list of items.
If an item in a list is a @{list} variable its value is returned. Possible variables from other items are replaced using ‘replace_scalar’. Result is always a list.
‘replace_until’ can be used to limit replacing arguments to certain index from the beginning. Used with Run Keyword variants that only want to resolve some arguments in the beginning and pass others to called keywords unmodified.
robot.variables.resolvable module
- class robot.variables.resolvable.GlobalVariableValue(value)[source]
Bases:
Resolvable
robot.variables.scopes module
robot.variables.search module
- robot.variables.search.search_variable(string: str, identifiers: Sequence[str] = '$@&%*', ignore_errors: bool = False) VariableMatch [source]
- robot.variables.search.contains_variable(string: str, identifiers: Sequence[str] = '$@&') bool [source]
- robot.variables.search.is_assign(string: str, identifiers: Sequence[str] = '$@&', allow_assign_mark: bool = False, allow_nested: bool = False, allow_items: bool = False) bool [source]
- robot.variables.search.is_scalar_assign(string: str, allow_assign_mark: bool = False, allow_nested: bool = False, allow_items: bool = False) bool [source]
- robot.variables.search.is_list_assign(string: str, allow_assign_mark: bool = False, allow_nested: bool = False, allow_items: bool = False) bool [source]
- robot.variables.search.is_dict_assign(string: str, allow_assign_mark: bool = False, allow_nested: bool = False, allow_items: bool = False) bool [source]
- class robot.variables.search.VariableMatch(string: str, identifier: str | None = None, base: str | None = None, items: tuple[str, ...] = (), start: int = -1, end: int = -1)[source]
Bases:
object
- property name: str | None
- property before: str
- property match: str | None
- property after: str
robot.variables.store module
robot.variables.tablesetter module
- class robot.variables.tablesetter.VariableTableSetter(store: VariableStore)[source]
Bases:
object
- class robot.variables.tablesetter.VariableResolver(value: Sequence[str], error_reporter=None)[source]
Bases:
Resolvable
- classmethod from_name_and_value(name: str, value: str | Sequence[str], separator: str | None = None, error_reporter=None) VariableResolver [source]
- classmethod from_variable(var: Var | Variable) VariableResolver [source]
- class robot.variables.tablesetter.ScalarVariableResolver(value: str | Sequence[str], separator: str | None = None, error_reporter=None)[source]
Bases:
VariableResolver
- class robot.variables.tablesetter.ListVariableResolver(value: Sequence[str], error_reporter=None)[source]
Bases:
VariableResolver
- class robot.variables.tablesetter.DictVariableResolver(value: Sequence[str], error_reporter=None)[source]
Bases:
VariableResolver