Littletree

Latest version: v0.8.1

Safety actively analyzes 681844 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.8.1

- `node.identifier = node.identifier` no longer raises a DuplicateChildError.
It has now become a no-op.

0.8.0

- Package is now based on [AbstractTree](https://github.com/lverweijen/AbstractTree).
The API has been revamped:
- Methods `tree.iter_nodes` and similar renamed to `iter(tree.nodes)`
- Methods `tree.count_nodes` and similar renamed to `tree.nodes.count()`
- Method `Node.to_image()` now returns `bytes`. Use `Node.to_pillow` to get an image.
- `littletree.export.*` is gone. Use `abstracttree.export.*` or `TreeMixin.*` instead.
- Methods `add_child`, `add_children` and `remove_child` have been added to `BaseNode`.
- Change transform to match abstract signature:
- Possible to change identifier when transforming
- Function takes just a node as argument.
- `Route` has a slightly different api.
- Rename `NodeMixin` to `TreeMixin`
- Move `BaseNode.path.to` to `TreeMixin.to`.

0.6.2

- Make better use of NodeMixin
- Make sure most exporter work directly on NodeMixin
- Move exporter functions (from Node) directly to NodeMixin.

0.6.1

- Remove `PathTo` class.
- Add class `Route` which is a generic version of the old `PathTo` class.

0.6.0

- Add `NodeMixin` class, which provides something even more basic than `BaseNode`.
- Add parameters `keep` and `deep` to `tree.copy()`.
So a pruned copy can be made by doing `tree.copy(keep=MaxDepth(3))`.
- Calling `iter_leaves` on a node that is a leaf
now correctly yields an iterable containing just that Node.
- Fix `iter_siblings` to use identity instead of equality.
- Methods `sort_children`, `update` and `clear` no longer return `self`, but None.

0.5.1

- Remove dataclasses (slots). Doesn't work until python3.10.
- Improve RowSerializer for pandas dataframe.
- Add newlines to output of `node.to_dot()` and `node.to_mermaid()`.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.