NodeDict#

class NodeDict(result: Dict[str, Any])[source]#

Bases: Mapping

Mapping of dictionary structure results.

The mapping allows to access data with both the string and the toolkit node objects.

Parameters:

result (Dict[str, Any]) – A dictionary of node/value pairs.

Example

>>> result = device.demods["*"].enable()
>>> print(result)
{
    '/dev1234/demods/0/enable': 0,
    '/dev1234/demods/1/enable': 1,
}
>>> result[device.demods[0].enable]
0
>>> result["/dev1234/demods/0/enable"]
0

New in version 0.3.5: Renamed from WildcardResult

Methods

to_dict()

Convert the WildcardResult to a dictionary.