pretty-mod 0.2.0__cp39-cp39-win32.whl → 0.2.1__cp39-cp39-win32.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pretty_mod/__main__.py +6 -0
- pretty_mod/_pretty_mod.cp39-win32.pyd +0 -0
- pretty_mod/_pretty_mod.pyi +7 -2
- pretty_mod/cli.py +21 -2
- {pretty_mod-0.2.0.dist-info → pretty_mod-0.2.1.dist-info}/METADATA +7 -5
- pretty_mod-0.2.1.dist-info/RECORD +12 -0
- pretty_mod-0.2.0.dist-info/RECORD +0 -11
- {pretty_mod-0.2.0.dist-info → pretty_mod-0.2.1.dist-info}/WHEEL +0 -0
- {pretty_mod-0.2.0.dist-info → pretty_mod-0.2.1.dist-info}/entry_points.txt +0 -0
- {pretty_mod-0.2.0.dist-info → pretty_mod-0.2.1.dist-info}/licenses/LICENSE +0 -0
pretty_mod/__main__.py
ADDED
Binary file
|
pretty_mod/_pretty_mod.pyi
CHANGED
@@ -14,7 +14,12 @@ class ModuleTreeExplorer:
|
|
14
14
|
def get_tree_string(self) -> str: ...
|
15
15
|
|
16
16
|
def display_tree(
|
17
|
-
root_module_path: str,
|
17
|
+
root_module_path: str,
|
18
|
+
max_depth: int = 2,
|
19
|
+
quiet: bool = False,
|
20
|
+
format: str = "pretty",
|
18
21
|
) -> None: ...
|
19
|
-
def display_signature(
|
22
|
+
def display_signature(
|
23
|
+
import_path: str, quiet: bool = False, format: str = "pretty"
|
24
|
+
) -> str: ...
|
20
25
|
def import_object(import_path: str) -> Any: ...
|
pretty_mod/cli.py
CHANGED
@@ -26,6 +26,14 @@ def main():
|
|
26
26
|
action="store_true",
|
27
27
|
help="Suppress warnings and informational messages",
|
28
28
|
)
|
29
|
+
tree_parser.add_argument(
|
30
|
+
"-o",
|
31
|
+
"--output",
|
32
|
+
type=str,
|
33
|
+
choices=["pretty", "json"],
|
34
|
+
default="pretty",
|
35
|
+
help="Output format (default: pretty)",
|
36
|
+
)
|
29
37
|
|
30
38
|
sig_parser = subparsers.add_parser("sig", help="Display function signature")
|
31
39
|
sig_parser.add_argument(
|
@@ -36,14 +44,25 @@ def main():
|
|
36
44
|
action="store_true",
|
37
45
|
help="Suppress download messages",
|
38
46
|
)
|
47
|
+
sig_parser.add_argument(
|
48
|
+
"-o",
|
49
|
+
"--output",
|
50
|
+
type=str,
|
51
|
+
choices=["pretty", "json"],
|
52
|
+
default="pretty",
|
53
|
+
help="Output format (default: pretty)",
|
54
|
+
)
|
39
55
|
|
40
56
|
args = parser.parse_args()
|
41
57
|
|
42
58
|
try:
|
43
59
|
if args.command == "tree":
|
44
|
-
display_tree
|
60
|
+
# Call display_tree with format parameter
|
61
|
+
display_tree(args.module, args.depth, args.quiet, args.output)
|
45
62
|
elif args.command == "sig":
|
46
|
-
|
63
|
+
# Call display_signature with format parameter
|
64
|
+
result = display_signature(args.import_path, args.quiet, args.output)
|
65
|
+
print(result)
|
47
66
|
else:
|
48
67
|
parser.print_help()
|
49
68
|
sys.exit(1)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pretty-mod
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.1
|
4
4
|
License-File: LICENSE
|
5
5
|
Summary: A python module tree explorer for LLMs (and humans)
|
6
6
|
Author-email: zzstoatzz <thrast36@gmail.com>
|
@@ -12,11 +12,9 @@ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
12
12
|
|
13
13
|
a python module tree explorer for LLMs (and humans)
|
14
14
|
|
15
|
-
> [!IMPORTANT]
|
16
|
-
> for all versions `>=0.1.0`, wheels for different operating systems are built via `maturin` and published to pypi, install `<0.1.0` for a pure python version
|
17
|
-
|
18
15
|
> [!NOTE]
|
19
|
-
>
|
16
|
+
> - For all versions `>=0.1.0`, wheels for different operating systems are built via `maturin` and published to PyPI. Install `<0.1.0` for a pure Python version.
|
17
|
+
> - Starting from v0.2.0, output includes colors by default. Use `PRETTY_MOD_NO_COLOR=1` to disable.
|
20
18
|
|
21
19
|
```bash
|
22
20
|
# Explore module structure
|
@@ -89,6 +87,10 @@ pretty-mod tree requests --depth 3
|
|
89
87
|
|
90
88
|
# Display function signatures
|
91
89
|
pretty-mod sig json:loads
|
90
|
+
|
91
|
+
# Get JSON output for programmatic use
|
92
|
+
pretty-mod tree json -o json | jq '.tree.submodules | keys'
|
93
|
+
pretty-mod sig json:dumps -o json | jq '.parameters'
|
92
94
|
pretty-mod sig os.path:join
|
93
95
|
|
94
96
|
# Explore packages even without having them installed
|
@@ -0,0 +1,12 @@
|
|
1
|
+
pretty_mod-0.2.1.dist-info/METADATA,sha256=XU2K3C1zsZUYuRlVlrIJrLxoRoayEKrSwb3TYbMsLNk,8660
|
2
|
+
pretty_mod-0.2.1.dist-info/WHEEL,sha256=nMUxrbCLp2Pz0D_O51GdD6kxOduzt3YdQAdKdi8KaTw,90
|
3
|
+
pretty_mod-0.2.1.dist-info/entry_points.txt,sha256=aNlomjGTypAOUeZiSZ4OYFY-QVq2KmDXkO9QFS45uW4,49
|
4
|
+
pretty_mod-0.2.1.dist-info/licenses/LICENSE,sha256=J2cPHis9ZpzSonH9dVASFNtKrAdQmI-6qYBlivuubwA,1087
|
5
|
+
pretty_mod/__init__.py,sha256=FWM2poN7eHWyVNly7AqU0RJlDHCrxhnk_k6LPFgyXcc,106
|
6
|
+
pretty_mod/__main__.py,sha256=FMOrprwCseFuswpUna-o5u1p_F_QpLN-ZE-2G2c3FGU,134
|
7
|
+
pretty_mod/_pretty_mod.cp39-win32.pyd,sha256=nfc3ay65VNMSDfA8-6rLAixeZnETfJPg0hUc5cuw3lY,5329920
|
8
|
+
pretty_mod/_pretty_mod.pyi,sha256=1okNy3hrmplQ2aocSG3T8pRIiOGtdPN0F1dTCNHWLQs,754
|
9
|
+
pretty_mod/cli.py,sha256=OELrAW58hq-GNqCMd_Q1S2FQc4jfyB0uK74zPCzfl7c,2249
|
10
|
+
pretty_mod/explorer.py,sha256=3w-oY7edQzQMlAOVUSBqPJ94tiuJZXc45yD9bDHFsTs,268
|
11
|
+
pretty_mod/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
|
+
pretty_mod-0.2.1.dist-info/RECORD,,
|
@@ -1,11 +0,0 @@
|
|
1
|
-
pretty_mod-0.2.0.dist-info/METADATA,sha256=3XGAL8KBJCHgmfBpLqfmWJplk_f6dS_0DFqRCbh3_4o,8516
|
2
|
-
pretty_mod-0.2.0.dist-info/WHEEL,sha256=nMUxrbCLp2Pz0D_O51GdD6kxOduzt3YdQAdKdi8KaTw,90
|
3
|
-
pretty_mod-0.2.0.dist-info/entry_points.txt,sha256=aNlomjGTypAOUeZiSZ4OYFY-QVq2KmDXkO9QFS45uW4,49
|
4
|
-
pretty_mod-0.2.0.dist-info/licenses/LICENSE,sha256=J2cPHis9ZpzSonH9dVASFNtKrAdQmI-6qYBlivuubwA,1087
|
5
|
-
pretty_mod/__init__.py,sha256=FWM2poN7eHWyVNly7AqU0RJlDHCrxhnk_k6LPFgyXcc,106
|
6
|
-
pretty_mod/_pretty_mod.cp39-win32.pyd,sha256=heM56DKgVgWIlvsZ4AA9YIiUjVJR4zoN5kKXFtsLW7g,5282304
|
7
|
-
pretty_mod/_pretty_mod.pyi,sha256=NXm_WH1UwB6qLrB6e-U21u0UwKL2w3dQWIiF-TNBxvU,682
|
8
|
-
pretty_mod/cli.py,sha256=xxYpUM-vCQ2XF5X0_z1cRyjWvnX8jDbVQuaZ0N23QAQ,1668
|
9
|
-
pretty_mod/explorer.py,sha256=3w-oY7edQzQMlAOVUSBqPJ94tiuJZXc45yD9bDHFsTs,268
|
10
|
-
pretty_mod/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
|
-
pretty_mod-0.2.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|