Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

No project description provided.

Project Description

Python library to generate nicely formatted trees, like the UNIX `tree`

## Example

Produce output like this:

├── bar
│ ├── a
│ └── b
├── baz
└── qux
└── c⏎

using code like this:

from operator import itemgetter

from tree_format import format_tree

tree = (
'foo', [
('bar', [
('a', []),
('b', []),
('baz', []),
('qux', [
('c\nd', []),

print format_tree(
tree, format_node=itemgetter(0), get_children=itemgetter(1))

## License

This is made available under the Apache Software License, version 2.0.

Copyright (c) 2015 - Jonathan M. Lange

## Testing

Run tests with:

python -m discover

Release History

This version
History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(6.7 kB) Copy SHA256 Hash SHA256
Wheel py2 Nov 6, 2017
(4.0 kB) Copy SHA256 Hash SHA256
Source None Nov 6, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers