A tiny library to print trees
Project description
This is a tiny library to print nested dictionaries as trees in the format of file trees.
Install
pip install pyggdrasil
Use
>>> from pyggdrasil import render_tree
>>>
>>> data = {
>>> 1: {
>>> "a": ["A", "B", "C"],
>>> "b": ["D", "E"]
>>> },
>>> 2: {
>>> "x": ["V", "W", "Q"],
>>> "y": ["Y", "Z"],
>>> "z": ["X", "Y"],
>>> }
>>> }
>>> print(render_tree(data))
├─ 1
│ ├─ a
│ │ ├─ A
│ │ ├─ B
│ │ └─ C
│ └─ b
│ ├─ D
│ └─ E
└─ 2
├─ x
│ ├─ V
│ ├─ W
│ └─ Q
├─ y
│ ├─ Y
│ └─ Z
└─ z
├─ X
└─ Y
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyggdrasil-0.1.1.tar.gz
(2.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyggdrasil-0.1.1.tar.gz.
File metadata
- Download URL: pyggdrasil-0.1.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-49-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66383f9c362888b0397334d71aad90f0b316b8395f14b68975e15f6fb93dd8e6
|
|
| MD5 |
40de8aac3562d7bd22f1aa0307203921
|
|
| BLAKE2b-256 |
11ed0dd2b720788161ebc3b3d5a0ce5745062e7a2d1b2ede469187c7b7d62ee3
|
File details
Details for the file pyggdrasil-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pyggdrasil-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-49-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb961ba9f79be513c9ac5d7db57180cb1bded4b70890b5ab572446ba2ce0d277
|
|
| MD5 |
1f7f7aa4ecf0ce12370a0f40f5fc99b7
|
|
| BLAKE2b-256 |
a1463810cd520cc3241286fdae441e99dfb9bbbc298ec8d1cf29490e83155aa8
|