Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.34 KB

README.rst

File metadata and controls

39 lines (27 loc) · 1.34 KB

perceptible

Observable versions of python data structures

Build Status Coverage Status Docs Status Package Status

This library is meant to be API compatible with standard Python objects, but with the addition of observability. Currently supports Lists and Dictionaries.

A simple use looks like this:

>>> from perceptible import ObservableDictionary
>>> def observer(o):
...     print('observer was called with', o)
...
>>> o_dict = ObservableDictionary()
>>> o_dict.add_observer(observer)
>>> o_dict['key'] = 'value'
observer was called with {'key': 'value'}

Installation is as simple as installing via pip.

pip install perceptible