Welcome to irtree
, a library for easily resolving complex data inheritance of an arbitrary depth written in Python.
Inheritance is a powerful feature that allows one set of data to inherit attributes from another set data. However, when dealing with complex inheritance hierarchies, it can be difficult to correctly resolve the inherited data. This is where irtree
comes in.
- Provides a simple and intuitive API for resolving inherited data
- Handles multiple inheritance (both
direct
andnon-direct
) scenarios - Allows customization of the
resolving
logic - Allows customization of the
data item
andnode
container - Extensively tested to ensure correctness and reliability
- python
poetry
-
git clone
this projectgit clone https://github.com/stephenp24/irtree.git
-
cd
to the irtree dircd irtree
-
poetry install
and let it find all the requirementspoetry install --without test,docs
-
Local repo, use poetry add
poetry add ../irtree
-
Git dependencies, use poetry add
poetry add git+ssh://git@github.com:stephenp24/irtree.git
irtree
came with a ContextualNode
class that should handle most of data inheritance cases, to use ContextualNode
simply construct one.
For more example look at the test files :)