Skip to main content

Tree Printer

A simple Python library that helps developers generate and share their project directory structures. Perfect for documenting project layouts in GitHub READMEs, technical documentation, or when explaining project organization to other developers.

Why Tree Printer?

When sharing your project on platforms like GitHub or discussing code organization with other developers, it's important to show your project's folder structure. However, manually typing out directory structures is:

  • Time-consuming
  • Error-prone
  • Hard to maintain as your project grows

Tree Printer solves this by automatically generating a clean, consistent directory structure that you can instantly copy into your documentation.

Example

Run:

dir-tree-printer /path/to/your/project

Get:

└── my-project
    ├── src
    │   └── components
    │       ├── Header.js
    │       └── Footer.js
    ├── tests
    ├── README.md
    └── package.json

Now you can directly paste this into your README, documentation, or anywhere else you need to show your project structure!

Installation

pip install dir-tree-printer

Usage

Command Line

# Basic usage
dir-tree-printer /path/to/directory

# Exclude specific folders
dir-tree-printer /path/to/directory --exclude node_modules .git

Python API

from tree_printer import TreePrinter

printer = TreePrinter()
printer.print_structure("./my_directory")

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for dir-tree-printer 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dir-tree-printer 0.1.1
File Size Uploaded
dir_tree_printer-0.1.1.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dir-tree-printer 0.1.1
File Interpreter ABI Platform
dir_tree_printer-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / dir_tree_printer-0.1.1.tar.gz

Download URL dir_tree_printer-0.1.1.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
92bcd85216e61f731a3f2c3cae0198cd6598dc53814f3e207441588ced427421
BLAKE2b-256 checksum
How to use checksums
e89b3706392aba986ad28533fcca4d91c5958ff987138a2b100e4aa518b0a6f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.7

Release files / dir_tree_printer-0.1.1-py3-none-any.whl

Download URL dir_tree_printer-0.1.1-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ea85158f5a5d76ad9b92058fa6dda086d53f0ed0cba282ee799cb6e338e1b6d
BLAKE2b-256 checksum
How to use checksums
a956f13df7fb442445a443f9aa86c1878670b61c04a5006865cd5b94353ba588
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page