xnjk
Render a directory as a tree you can paste into a README or a bug report.
Install
pip install xnjk
Usage
from xnjk import render_tree
print(render_tree("src", n_max_depth=2))
# src/
# ├── pkg/
# │ └── core.py
# └── main.py
Options
| Option | Default | Meaning |
|---|---|---|
n_max_depth |
3 | levels of nesting to descend |
n_show_files |
True |
include files, not just directories |
n_max_entries |
500 | stop after this many lines |
Guarantees
Directories sort before files, both case-insensitively, so output is stable across platforms. Unreadable directories are logged and skipped instead of raising. Symlinks are not followed, so a loop cannot hang the walk.
License
MIT
Metadata
Release files for xnjk 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 | |
|---|---|---|---|---|
| xnjk-0.0.2.tar.gz | 3.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xnjk-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / xnjk-0.0.2.tar.gz
| Download URL | xnjk-0.0.2.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d2771ebc583cb00eaf0210043150b5a3b642219e946065f72697657abc9bf89
|
|
BLAKE2b-256 checksum How to use checksums |
c89a84429b80fa105f698568d08d75a3afa2a7d4a5f80037356684bb224208cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Release files / xnjk-0.0.2-py3-none-any.whl
| Download URL | xnjk-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
727c3ebc41ff19869a8d50a01810741a241ef2dd3e81afe21385780e94061d11
|
|
BLAKE2b-256 checksum How to use checksums |
d3c97a0cd78ada655a58601595fbb6359cf881f68044cb2fea9494d25a8118d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Security for xnjk 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.