Skip to main content

treegenerator

Generate a recursive tree diagram given a starting directory or a list of URIs.
Install with:

pip install treegenerator

Contains two classes: TreeGenerator and UrlTreeGenerator.
TreeGenerator takes a local file path and recursively generates a tree representation of all subdirectories.
UrlTreeGenerator takes a list of urls and generates a tree representation of them.

Usage:

from treegenerator import TreeGenerator
from pathlib import Path
generator = TreeGenerator(Path.cwd())
print(generator)

produces

treeGenerator
|  |-dist
|  |  |-treegenerator-0.0.1-py3-none-any.whl
|  |  |_treegenerator-0.0.1.tar.gz
|  |
|  |-LICENSE.txt
|  |-README.md
|  |-pyproject.toml
|  |-src
|  |  |-treeGenerator
|  |  |  |-__init__.py
|  |  |  |_treeGenerator.py

The dictionary representing the tree can be accessed through the 'tree' member.

import json
print(json.dumps(generator.tree, indent=1))

produces

{
 "treeGenerator": {
  "dist": {
   "treegenerator-0.0.1-py3-none-any.whl": {},
   "treegenerator-0.0.1.tar.gz": {}
  },
  "LICENSE.txt": {},
  "README.md": {},
  "pyproject.toml": {},
  "src": {
   "treeGenerator": {
    "__init__.py": {},
    "treeGenerator.py": {}
   }
  }
 }
}

Metadata

Release files for treegenerator 1.0.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 treegenerator 1.0.1
File Size Uploaded Provenance Actions
treegenerator-1.0.1.tar.gz 37.6 kB Without provenance Details for treegenerator-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for treegenerator 1.0.1
File Interpreter ABI Platform Actions
treegenerator-1.0.1-py3-none-any.whl Python 3 none any Details for treegenerator-1.0.1-py3-none-any.whl

Total release size: 41.6 kB

Release files / treegenerator-1.0.1.tar.gz

Download URL treegenerator-1.0.1.tar.gz
Size 37.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9398d46a0a7c9d8fda6b5708d4a5a2d1a17a2e06315262ca3cae295fd12a3eec
BLAKE2b-256 checksum
How to use checksums
eb92db2d43fdcacef994819b901f44c1ae5003377101c3a439cdc57b3c78829b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release files / treegenerator-1.0.1-py3-none-any.whl

Download URL treegenerator-1.0.1-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb1e0b81e3e9bbd73f027cd31b89b2b0855a1b5a506b9a7a21a4c988035206f0
BLAKE2b-256 checksum
How to use checksums
94eed9194756137f47782e06f8fbac66cf9c94f15822fa2ffcaaead38e5ca969
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Security for treegenerator 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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