Skip to main content

Ascii Tree Creator for Python!

Project description

Treer

Ascii Tree Tool for Python!

Powered by Yamato Nagata

GitHub

from treer import Tree

root = Tree.from_path("tests")
root.colorize = False
print(root.draw())
# tests
#  ├── test.py
#  └── test_dir
#       ├── dir1
#       │    ├── dir1-1
#       │    │    └── dir1-1-1
#       │    ├── dir1-2
#       │    └── *dir1-3
#       ├── dir1-1
#       └── dir2
#            ├── dir2-1
#            └── dir2-2

root = Tree.from_mapping({
            'root': {
                'dir1': {
                    'file1': None,
                    'file2': None,
                    'dir1-2': {
                        'file3': None,
                    },
                },
                'dir3': [
                    'file4',
                    'file5',
                ],
                'dir4': 'file6'
            }
        })
root.colorize = False
print(root.draw())
# root
#  ├── dir1
#  │    ├── file1
#  │    ├── file2
#  │    └── dir1-2
#  │         └── file3
#  ├── dir3
#  │    ├── file4
#  │    └── file5
#  └── dir4
#       └── file6

colored example

output

Installation

$ pip install treer

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

Treer-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

Treer-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file Treer-0.1.0.tar.gz.

File metadata

  • Download URL: Treer-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for Treer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2e969cee911a8d457dcf7fb79b88f1950fb0f028f58486539be0e38074dc6c6f
MD5 e110848e470344c155f88442941de406
BLAKE2b-256 9307de5142bdc07d133e00ae256ede32ed3e3bfabb7879c64b54fc4cad5d85ca

See more details on using hashes here.

File details

Details for the file Treer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: Treer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for Treer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 25760565174c327ca21ff9da4bf73d6261ee62df652c5245da2fa8c6c4bb0761
MD5 b3793cf98af1bc1d581dab8869dc7e79
BLAKE2b-256 873e1db0f5377a2471ac5b9d3ed7e69e0b608d04ab1cd69b161ed57844368287

See more details on using hashes here.

Supported by

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