A module tree explorer for humans and LLMs
Project description
pretty-mod
A module tree explorer for humans and LLMs.
Installation
uv add pretty-mod
Usage
from pretty_mod.explorer import ModuleTreeExplorer
# Explore a module structure
explorer = ModuleTreeExplorer("json", max_depth=2)
print(explorer.get_tree_string())
Example output
๐ฆ json
โโโ ๐ __all__: dump, dumps, load, loads, JSONDecoder, JSONDecodeError, JSONEncoder
โโโ โก functions: dump, dumps, load, loads
โโโ ๐ฆ decoder
โโโ ๐ __all__: JSONDecoder, JSONDecodeError
โโโ ๐ท classes: JSONDecodeError, JSONDecoder
โโโ ๐ฆ encoder
โโโ ๐ท classes: JSONEncoder
โโโ โก functions: py_encode_basestring, py_encode_basestring_ascii
โโโ ๐ฆ scanner
โโโ ๐ __all__: make_scanner
โโโ ๐ฆ tool
โโโ โก functions: main
from pretty_mod.explorer import display_signature
# Display function signatures
print(display_signature("json:loads"))
Example output
๐ loads
โโโ Parameters:
โโโ s
โโโ cls = None (keyword-only)
โโโ object_hook = None (keyword-only)
โโโ parse_float = None (keyword-only)
โโโ parse_int = None (keyword-only)
โโโ parse_constant = None (keyword-only)
โโโ object_pairs_hook = None (keyword-only)
โโโ kw (**kwargs)
CLI
Pretty-mod includes a command-line interface for quick exploration:
# Explore module structure
pretty-mod tree json
pretty-mod tree requests --depth 3
# Display function signatures
pretty-mod sig json:loads
pretty-mod sig os.path:join
Examples
See the examples/ directory for more detailed usage patterns and advanced features.
Development
git clone https://github.com/zzstoatzz/pretty-mod.git
cd pretty-mod
uv sync
uv run pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pretty_mod-0.0.3.tar.gz
(30.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pretty_mod-0.0.3.tar.gz.
File metadata
- Download URL: pretty_mod-0.0.3.tar.gz
- Upload date:
- Size: 30.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b163f37f8b6a856dd627a451a3ea0d0264c200274a65d325821942ddcabd064d
|
|
| MD5 |
845e4b3cb43906b5e19c2152ef978abf
|
|
| BLAKE2b-256 |
1919e2065aa12e683be09e9da8c47fada08db8583c5c920de9945cf6d486934e
|
File details
Details for the file pretty_mod-0.0.3-py3-none-any.whl.
File metadata
- Download URL: pretty_mod-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4d9b4d8e317998615631ec174a11aa0328d9fe30a304142ccde556dedf7f24e
|
|
| MD5 |
beb341b0ab515638829816b13032cf18
|
|
| BLAKE2b-256 |
e7cc9f7c8064d289e0aa9bb098d27b3a0b3aa64c80ab0e4cc0aa811b63784bb8
|