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)
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


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)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

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

Hashes for pretty_mod-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6d9699819efa2a08b385a68229f161a5ebae7513ca9857d426080335695ce109
MD5 8c2b9ee8f45fd483e8bbe0b026a85ae0
BLAKE2b-256 d9408b10db0632a12bb5892e4872f8fb0b99bac9112cead32c27b003f5958df8

See more details on using hashes here.

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

Hashes for pretty_mod-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e7f146e44f1a214e891b475df9c622f5d664f2f6fbd2ed8559a7b86367f1e0d5
MD5 038bf3294aa2088a75c9e57a2fbbc5bf
BLAKE2b-256 2386df2b9660e7d4131e5b59e836fd30edb925ef5478f55b8cf7d3bf33a8476c

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