Quick Start

Create a tree

You can easily create a tree value object based on FastTreeValue.

1
2
3
4
5
from treevalue import FastTreeValue

if __name__ == '__main__':
    t = FastTreeValue({'a': 1, 'b': 2, 'x': {'c': 3, 'd': 4}})
    print(t)

The result should be

1
2
3
4
5
6
<FastTreeValue 0x7f9abb1ecdc0 keys: ['a', 'b', 'x']>
├── 'a' --> 1
├── 'b' --> 2
└── 'x' --> <FastTreeValue 0x7f9abb593d90 keys: ['c', 'd']>
    ├── 'c' --> 3
    └── 'd' --> 4

A simple tree value structure is created successfully with the structure below.

../../_images/create_a_tree.gv1.svg

Now you are successfully started.