Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pretty_mod-0.0.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

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

Hashes for pretty_mod-0.0.2.tar.gz
Algorithm Hash digest
SHA256 315e3e17c978770f3130fe7f227b003115f207b55f8ee67432a3feec2f4d2140
MD5 38c9bcae50f68e6230730dd44c050396
BLAKE2b-256 5cbbe760aa1588826d383b075ea3f3d06bc2c199b7d44173ce8b4ed4d2995e0d

See more details on using hashes here.

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

Hashes for pretty_mod-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2dd76de85280c128dfdb61d589e27640ca489c0200433c7dce20716b74fab5ed
MD5 87cd7414af778354cb5727157cae487c
BLAKE2b-256 7f70ac57e4347dbcfb9c96bdad2b6afffc13cfe90d3c2d992eec85913f40e762

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page