dir_tree
print directory tree
Similar as tree in terminal.
Install
pip install dir-tree
How to use
Import tree function:
from dir_tree.dir_tree import tree
tree('test_dir')
test_dir - 3 dirs 0 files
sub_dir_1 - 4 dirs 0 files
sub_dir_1_1 - 0 dirs 0 files
sub_dir_1_2 - 0 dirs 0 files
sub_dir_1_3 - 0 dirs 0 files
sub_dir_1_4 - 0 dirs 0 files
sub_dir_2 - 5 dirs 0 files
sub_dir_2_1 - 0 dirs 0 files
sub_dir_2_2 - 0 dirs 0 files
sub_dir_2_3 - 0 dirs 0 files
sub_dir_2_4 - 0 dirs 0 files
sub_dir_2_5 - 0 dirs 0 files
sub_dir_3 - 6 dirs 0 files
sub_dir_3_1 - 0 dirs 0 files
sub_dir_3_2 - 0 dirs 0 files
sub_dir_3_3 - 0 dirs 0 files
sub_dir_3_4 - 0 dirs 0 files
sub_dir_3_5 - 0 dirs 0 files
sub_dir_3_6 - 0 dirs 0 files
You can sent string or Path object to tree function.
from pathlib import Path
path = Path('test_dir')
Now we can use path:
tree(path)
And we can 'patch' Path as:
`Path.tree = tree'
Now we can use it as:
path.tree()
And better, if you use fastcore, you can patch it using @patch decorator.
I didnt use it becouse won't use any dependences.
Now it has only base functionality.
In plans: ipywidgets and cl functionalitys.
Metadata
Release files for dir-tree 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dir_tree-0.0.2.tar.gz | 9.2 kB | Without provenance | Details for dir_tree-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dir_tree-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for dir_tree-0.0.2-py3-none-any.whl |
Total release size: 16.8 kB
Release files / dir_tree-0.0.2.tar.gz
| Download URL | dir_tree-0.0.2.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ad49c731375971976e1cf5fbed9a27776bfa52a8cab315c344586643e85539b
|
|
BLAKE2b-256 checksum How to use checksums |
3fd2b300c3d97706e05b3bdd7be36fa1989485476a2bacadc4f2a82a9548c811
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|
Release files / dir_tree-0.0.2-py3-none-any.whl
| Download URL | dir_tree-0.0.2-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc37b8756bba6e60799a3f0f0254dc36e605211007c9a71f3343768327e17fd0
|
|
BLAKE2b-256 checksum How to use checksums |
8a60e1eed196ea6c8644877851246a2d823d93b3e20e4ff388363cf6f117ed00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|
Security for dir-tree 0.0.2
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.