asciitree
Draws ASCII trees.
What it is and what it does
asciitree is a small utility that converts nested dictionary structures into ASCII tree diagrams suitable for printing in a terminal. It takes a dict-based representation of a tree (where keys are node labels and values are child dicts) and renders it using box-drawing characters and indentation.
The package provides a simple interface: instantiate a layout class like LeftAligned, then call it with your tree dict to get a formatted string. It has no runtime dependencies and is straightforward to integrate into scripts or CLI tools that need to display hierarchical data. However, the project has been dormant since 2016-09-05 with no specified Python version support, making it a legacy tool best suited for maintenance of existing code rather than new projects.
Use it for:
- Display directory or file hierarchies in a CLI tool without external dependencies.
- Render organizational charts or decision trees in terminal-based applications.
- Debug nested data structures by visualizing their tree form during development.
- Generate ASCII tree output for documentation or log files from programmatic data.
- Build simple terminal UIs that show hierarchical relationships in a human-readable format.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Renders tree data structures as formatted ASCII art for display in the terminal, using simple dict-based input to generate box-drawing output.
No, unless you are maintaining legacy code already using it. The package is dormant (last release 2016-09-05), has no specified Python version support, and high install friction. For new projects, consider actively maintained alternatives. The permissive MIT license poses no legal barrier, but the maintenance gap and age make it a poor choice for new development.
Install
asciitree on PyPI
pip
pip install asciitreeuv
uv add asciitreepoetry
poetry add asciitreeInstalling asciitree
Before you install
High install friction: the package is dormant (last release 2016-09-05) with no specified Python version support. No runtime dependencies, but age and lack of maintenance signal warrant caution for new projects.
License in practice
MIT license is permissive and imposes minimal restrictions; you may use, modify, and distribute the package freely with attribution.
Quickstart
from asciitree import LeftAligned
from collections import OrderedDict as OD
tree = {'root': OD([('child', {})])}
tr = LeftAligned()
print(tr(tree))
Python version support is unspecified; compatibility with modern Python versions is not guaranteed.
Verify before relying
- Whether the package works reliably on current Python versions, given no specified version support and dormant status since 2016.
- Whether the package handles edge cases (very deep trees, unicode characters, wide terminal widths) as expected.
- Current usability on Python versions released after the last 2016-09-05 release.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | dormant — 3,630 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 976,487/month — #4,593 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: asciitree-0.3.3.tar.gz
Tags
More Terminals packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
richRich renders styled text, tables, progress…
permissive · top 100 on PyPI
coloramaColorama makes ANSI escape sequences for…
permissive · top 100 on PyPI
wcwidthMeasures the displayed width of Unicode strings…
permissive · top 1,000 on PyPI
ptyprocessRun a subprocess in a pseudo terminal (pty) and…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
asciichartpyRenders line charts as ASCII art in the console…
permissive · top 15,000 on PyPI
asciidagRenders directed acyclic graphs as ASCII art in…
copyleft · top 15,000 on PyPI
treescopeTreescope is an interactive HTML pretty-printer…
permissive · top 5,000 on PyPI
ascii-magicConverts images into ASCII art for display in…
permissive · top 15,000 on PyPI
ascii-guardDetects and fixes misaligned ASCII art boxes in…
permissive · top 15,000 on PyPI
terminaltables3Renders formatted tables in terminal output…
permissive · top 15,000 on PyPI
rich-pixelsRenders pixel images and ASCII art grids to the…
unclear · top 15,000 on PyPI
artConverts text and generates one-line ASCII art…
permissive · top 5,000 on PyPI
seedirGenerates ASCII tree diagrams of folder…
permissive · top 15,000 on PyPI
pycowsayDisplays text in a formatted ASCII art cow…
permissive · top 15,000 on PyPI