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)
explorer.explore()
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)
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.1.tar.gz
(29.1 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.1.tar.gz.
File metadata
- Download URL: pretty_mod-0.0.1.tar.gz
- Upload date:
- Size: 29.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d9699819efa2a08b385a68229f161a5ebae7513ca9857d426080335695ce109
|
|
| MD5 |
8c2b9ee8f45fd483e8bbe0b026a85ae0
|
|
| BLAKE2b-256 |
d9408b10db0632a12bb5892e4872f8fb0b99bac9112cead32c27b003f5958df8
|
File details
Details for the file pretty_mod-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pretty_mod-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.0 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 |
e7f146e44f1a214e891b475df9c622f5d664f2f6fbd2ed8559a7b86367f1e0d5
|
|
| MD5 |
038bf3294aa2088a75c9e57a2fbbc5bf
|
|
| BLAKE2b-256 |
2386df2b9660e7d4131e5b59e836fd30edb925ef5478f55b8cf7d3bf33a8476c
|