jlubcke / tri.struct

tri.struct supplies classes that can be used like dictionaries and as objects with attribute access at the same time
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

.. image:: https://travis-ci.org/TriOptima/tri.struct.svg?branch=master :target: https://travis-ci.org/TriOptima/tri.struct .. image:: http://codecov.io/github/TriOptima/tri.struct/coverage.svg?branch=master :target: http://codecov.io/github/TriOptima/tri.struct?branch=master

tri.struct

tri.struct supplies classes that can be used like dictionaries and as objects with attribute access at the same time. There are two versions:

Some niceties include:

Example

.. code:: python

>>> from tri_struct import Struct
>>> foo = Struct()
>>> foo.a = 1
>>> foo['a']
1
>>> foo['a'] = 2
>>> foo.a
2

Running tests

You need tox installed then just make test.

License

BSD

Documentation

http://tristruct.readthedocs.org.