tree representation of Python data

Dino dino at no.spam.ar
Sat Jan 21 10:03:28 EST 2023


I have a question that is a bit of a shot in the dark. I have this nice 
bash utility installed:

$ tree -d unit/
unit/
├── mocks
├── plugins
│   ├── ast
│   ├── editor
│   ├── editor-autosuggest
│   ├── editor-metadata
│   ├── json-schema-validator
│   │   └── test-documents
│   └── validate-semantic
│       ├── 2and3
│       ├── bugs
│       └── oas3
└── standalone
     └── topbar-insert

I just thought that it would be great if there was a Python utility that 
visualized a similar graph for nested data structures.
Of course I am aware of indent (json.dumps()) and pprint, and they are 
OK options for my need. It's just that the compact, improved 
visualization would be nice to have. Not so nice that I would go out of 
my way to build, but nice enough to use an exising package.

Thanks

Dino


More information about the Python-list mailing list