Skip to main content

Visualizes directory tree from the current command line folder.

Project description

Treee

This package was created to help me visualize directory structures in my coding tutorials. There are many ASCII tree visualizers available but this one adds two features I needed:

  • Sort alphabetically but first by directories, then by files
  • Exclude directories from output

Example:

dirtree/
├── dist/
│   ├── treee-1.0.0-py3-none-any.whl
│   └── treee-1.0.0.tar.gz
├── src/
│   └── treee/
│       └── tree.py
├── .gitignore
├── LICENSE.txt
├── README.md
└── pyproject.toml

Install

pip install treee

Visit project on PyPI

Features

  • Shows ASCII tree of current folder and beyond
  • Sorts by type (folders on top), then by name
  • Supports excluding of directories
  • Can be run from terminal or imported in Python code

Import in exising code

from treee import tree

tree.print_tree()

Run from command line

treee

Exclude files

Create file .dirtree-ignore in the directory where treee is executed.

Example of ignored directories:

env
__pycache__
*egg*
.git

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

treee-1.0.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

treee-1.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file treee-1.0.1.tar.gz.

File metadata

  • Download URL: treee-1.0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for treee-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6460196cadb39bcc8c9bbee84113dff9289bf8a76553bf552d99f1440411b896
MD5 c532a6fdc5a6d0b25bef633613cc0f97
BLAKE2b-256 b1bee1e2bff043b4c492322218dbc107e62d26ca3c6d8e6961deb8b1ad60b7ec

See more details on using hashes here.

File details

Details for the file treee-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: treee-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for treee-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2fedc3061268d76016fc9390f757587430d64d1ebeaf740b8d159cba577eecc8
MD5 408c6908e6809ca759c6649c5bbc53b7
BLAKE2b-256 2c0f83c67f7adb418837938589a15a955c352e9d30b944ee5db48c2a4a610234

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