Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyggdrasil-0.1.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

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

Hashes for pyggdrasil-0.1.1.tar.gz
Algorithm Hash digest
SHA256 66383f9c362888b0397334d71aad90f0b316b8395f14b68975e15f6fb93dd8e6
MD5 40de8aac3562d7bd22f1aa0307203921
BLAKE2b-256 11ed0dd2b720788161ebc3b3d5a0ce5745062e7a2d1b2ede469187c7b7d62ee3

See more details on using hashes here.

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

Hashes for pyggdrasil-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eb961ba9f79be513c9ac5d7db57180cb1bded4b70890b5ab572446ba2ce0d277
MD5 1f7f7aa4ecf0ce12370a0f40f5fc99b7
BLAKE2b-256 a1463810cd520cc3241286fdae441e99dfb9bbbc298ec8d1cf29490e83155aa8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page