New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pygentree

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pygentree

A Python package to generate ASCII tree representation of directory structures

  • 1.0.4
  • PyPI
  • Socket score

Maintainers
1

PyGenTree

PyPI version License Python versions

A Python package to generate ASCII tree representation of directory structures.

Requirements

  • Python 3.6 or higher

Installation

pip install pygentree

Usage

# Basic usage (current directory)
pygentree

# Specify a directory
pygentree /path/to/directory

# Limit depth level
pygentree -l 2

# Sort files and folders
pygentree -s asc   # ascending order
pygentree -s desc  # descending order
pygentree -s standard  # default: folders first, then files

# Show only directories
pygentree -d

# Ignore hidden files and directories, e.g. .git, .env, etc.
pygentree --ignore-hidden

# Exclude specific files or directories (comma-separated)
pygentree -e "node_modules,venv,dist"

# Save output to file
pygentree -o tree.txt

# Show version
pygentree -v

# Show help
pygentree -h

Features

  • Generate ASCII tree representation of directory structures
  • Customize maximum depth level
  • Multiple sorting options
  • Option to show only directories
  • Option to ignore hidden files and directories
  • Exclude specific files and directories
  • Save output to file
  • Handle permission errors gracefully
  • Cross-platform compatibility

Supported Python Versions

  • Python 3.6
  • Python 3.7
  • Python 3.8
  • Python 3.9
  • Python 3.10
  • Python 3.11
  • Python 3.12

License

MIT License

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc