The watcher.common.utils Module

The watcher.common.utils Module

Utilities and helper functions.

class watcher.common.utils.Struct[source]

Bases: dict

Specialized dict where you access an item like an attribute

>>> struct = Struct()
>>> struct['a'] = 1
>>> struct.b = 2
>>> assert struct.a == 1
>>> assert struct['b'] == 2
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.