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)
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.2.tar.gz
(29.2 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.2.tar.gz.
File metadata
- Download URL: pretty_mod-0.0.2.tar.gz
- Upload date:
- Size: 29.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
315e3e17c978770f3130fe7f227b003115f207b55f8ee67432a3feec2f4d2140
|
|
| MD5 |
38c9bcae50f68e6230730dd44c050396
|
|
| BLAKE2b-256 |
5cbbe760aa1588826d383b075ea3f3d06bc2c199b7d44173ce8b4ed4d2995e0d
|
File details
Details for the file pretty_mod-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pretty_mod-0.0.2-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 |
2dd76de85280c128dfdb61d589e27640ca489c0200433c7dce20716b74fab5ed
|
|
| MD5 |
87cd7414af778354cb5727157cae487c
|
|
| BLAKE2b-256 |
7f70ac57e4347dbcfb9c96bdad2b6afffc13cfe90d3c2d992eec85913f40e762
|