Barrel
This library enables model-like encapsulation of big dict structure (like JSON data).
When I die I want to decompose in a barrel of porter and have it served in all the pubs in Dublin.
J. P. Donleavy
The goal is to not map the underlying dict but just wrap it in a programmer-friendly structure to allow attribute-like access and field aliasing.
Field aliasing enables to virtually:
- change key names
- modify the apparent structure of the dict
Installation
Nothing to fancy - clone the repo and run
python setup.py install
Or using pip:
pip install https://github.com/txtr/barrel/archive/master.zip
Requirements:
holon
- library that provides an interface to communicate with the Reaktor.blinker
- events dispatching library.
python-money
might become a requirement to simplify the amount \ currency handling.
At the moment it is useless, because of the Reaktor inconsistency.
Usage
Please, refer to tests.
Running tests
python -m unittest discover barrel.tests
License
BSD, see LICENSE
for more details.
Contributors
txtr web team - web-dev@txtr.com.