Observable versions of python data structures
Project description
Observable versions of python data structures
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
perceptible-0.4.2.tar.gz
(19.4 kB
view hashes)
Built Distribution
Close
Hashes for perceptible-0.4.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44693c8d890843b1068f0671b4ce7fd53dc84504f3741ccee6035eee24adbca0 |
|
MD5 | 0ec97fe131936e98a229dbc52e2a96a3 |
|
BLAKE2b-256 | 2ab02bb34c22ead6cd27e28d955ff3755ba55193167ba150857b1e294d877059 |