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 specific directories and files from the output

Example:

treee/
├── 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 .treee-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.2.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.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: treee-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 01a5ff95d65f03cb3e54ee0af22f4da8552eb3524594707780bfec6969c88bab
MD5 1676bc8606dbe8c6cff42b120b6dc4ac
BLAKE2b-256 97307ebfb3bfc9d044ed6ecc0679f003147c689c04f0b41fdaa7fa808e03f6fd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: treee-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 20cc351847138041fe5c406b3f5678673226ce1087f354745aac61186bb6f19f
MD5 86e105bd273434922ceeeef07415d9ea
BLAKE2b-256 6e1055d8aba8456621d9a720709251811aafb93790b9b1dbe34c048c83c588c2

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