euromod.container¶
Below are listed the main public classes of the euromod.container module.
This class is a container for objects that allow for indexing and representation in multiple ways: |
- class euromod.container.Container(idDict=False)¶
- This class is a container for objects that allow for indexing and representation in multiple ways:
- - via keys that are the name of the objects or,
- - via integer indexing as in a list.
Overview
Methods¶ find(key, pattern, return_children, case_insentive)Find objects that match pattern.
items()Get items of the
Container.keys()Get keys of the
Container.values()Get values of the
Container.Methods
- find(key, pattern, return_children=False, case_insentive=True)¶
Find objects that match pattern.
- Parameters:
key (
str) – Name of the attribute or the attribute of a child element that you want to look for One can search child elements by using the dot-notation. E.g.: mod[“BE”][“BE_2023”].policies.find(“functions.name”,”BenCalc”)pattern (
str) – pattern that you want to match.return_children (bool, optional) – When True, the return type will be a Container containing elements of the type for which the find method was used When False, the return type will be a Container of the elements of the deepest level specified by the pattern key-word. E.g.: mod[“BE”][“BE_2023”].policies.find(“function) The default is False.
case_insentive (
bool, optional) – DESCRIPTION. The default is True.
- Returns:
An object that matches the pattern.
- Return type:
- keys()¶
Get keys of the
Container.- Returns:
Names of the attribute or the attribute of a child element.
- Return type: