Skip to main content

Print a directory tree structure in your Python code.

Project description

directory-structure

Print a directory tree structure in your Python code.

Download

You can simply:

pip install directory-structure

Or you can also:

  1. Clone the repository to your local machine.
  2. Enter the directory.
  3. Download necessary modules/libraries.
git clone https://github.com/gabrielstork/directory-structure.git
cd directory-structure
pip install -r requirements.txt

Examples

complete=True:

from directory_structure.tree import Tree

path = Tree('C:/Users/User/Desktop/directory-structure', complete=True)
print(path)
๐Ÿ“‚ C:
|_๐Ÿ“‚ Users
  |_๐Ÿ“‚ User
    |_๐Ÿ“‚ Desktop
      |_๐Ÿ“‚ directory-structure
        |_๐Ÿ“ .git
        |_๐Ÿ“ dist
        |_๐Ÿ“ src
        |_๐Ÿ“ tests
        |_๐Ÿ“„ LICENSE
        |_๐Ÿ“„ pyproject.toml
        |_๐Ÿ“„ README.md
        |_๐Ÿ“„ requirements.txt
        |_๐Ÿ“„ setup.py

complete=False:

from directory_structure.tree import Tree

path = Tree('C:/Users/User/Desktop/directory-structure', complete=False)
print(path)
๐Ÿ“‚ directory-structure
|_๐Ÿ“ .git
|_๐Ÿ“ dist
|_๐Ÿ“ src
|_๐Ÿ“ tests
|_๐Ÿ“„ LICENSE
|_๐Ÿ“„ pyproject.toml
|_๐Ÿ“„ README.md
|_๐Ÿ“„ requirements.txt
|_๐Ÿ“„ setup.py

Project details


Download files

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

Source Distribution

directory-structure-1.0.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

directory_structure-1.0.0-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page