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 details)
Built Distribution
File details
Details for the file perceptible-0.4.2.tar.gz
.
File metadata
- Download URL: perceptible-0.4.2.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.2 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdc413a3f8ffd69eeccf1b98b953c2732355f0a20270944a9806d7585acbdf56 |
|
MD5 | c6b54181d687545813e712b9a5c52762 |
|
BLAKE2b-256 | 2979386ffd9ad5508c17963d91fad094c87a9fe1cfc70d2e1e548827410f70b8 |
File details
Details for the file perceptible-0.4.2-py2.py3-none-any.whl
.
File metadata
- Download URL: perceptible-0.4.2-py2.py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.2 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44693c8d890843b1068f0671b4ce7fd53dc84504f3741ccee6035eee24adbca0 |
|
MD5 | 0ec97fe131936e98a229dbc52e2a96a3 |
|
BLAKE2b-256 | 2ab02bb34c22ead6cd27e28d955ff3755ba55193167ba150857b1e294d877059 |