Package netaddr :: Package ip :: Class DictUpdater |
[hide private]
[frames] | no frames]

# Class DictUpdater

source code

         object --+
                  |
    core.Subscriber --+
                      |
                     DictUpdater

Concrete Subscriber that inserts records received from a Publisher into a dictionary.

Instance Methods | [hide private]
__init__(self, dct, topic, unique_key) Constructor. | source code
update(self, data) Callback function used by Publisher to notify this Subscriber about an update. | source code
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, dct, topic, unique_key) (Constructor) | source code
Constructor. dct - lookup dict or dict like object to insert records into. topic - high-level category name of data to be processed. unique_key - key name in data dict that uniquely identifies it. Overrides: object.__init__

### update(self, data) | source code
Callback function used by Publisher to notify this Subscriber about an update. Stores topic based information into dictionary passed to constructor. Overrides: core.Subscriber.update