treelib is a python library that provides an efficient implementation of tree data structure.
The main features of treelib include:
- Efficient operation of node searching, O(1).
- Support common tree operations like traversing, insertion, deletion, node moving, shallow/deep copying, subtree cutting etc.
- Support user-defined data payload to accelerate your model construction.
- Pretty tree showing and text/json dump for pretty show and offline analysis.
- Compatible with Python 2 and 3.