pretty-mod 0.1.2__cp311-cp311-musllinux_1_2_i686.whl → 0.2.0__cp311-cp311-musllinux_1_2_i686.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/_pretty_mod.cpython-311-i386-linux-musl.so +0 -0
- {pretty_mod-0.1.2.dist-info → pretty_mod-0.2.0.dist-info}/METADATA +113 -72
- {pretty_mod-0.1.2.dist-info → pretty_mod-0.2.0.dist-info}/RECORD +6 -6
- {pretty_mod-0.1.2.dist-info → pretty_mod-0.2.0.dist-info}/WHEEL +0 -0
- {pretty_mod-0.1.2.dist-info → pretty_mod-0.2.0.dist-info}/entry_points.txt +0 -0
- {pretty_mod-0.1.2.dist-info → pretty_mod-0.2.0.dist-info}/licenses/LICENSE +0 -0
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pretty-mod
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.2.0
|
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>
|
@@ -15,6 +15,9 @@ a python module tree explorer for LLMs (and humans)
|
|
15
15
|
> [!IMPORTANT]
|
16
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
17
|
|
18
|
+
> [!NOTE]
|
19
|
+
> Starting from v0.2.0, output includes colors by default. Use `PRETTY_MOD_NO_COLOR=1` to disable.
|
20
|
+
|
18
21
|
```bash
|
19
22
|
# Explore module structure
|
20
23
|
» uvx pretty-mod tree json
|
@@ -32,57 +35,85 @@ a python module tree explorer for LLMs (and humans)
|
|
32
35
|
└── 📦 tool
|
33
36
|
└── ⚡ functions: main
|
34
37
|
|
35
|
-
# Inspect function signatures
|
36
|
-
»
|
37
|
-
📎
|
38
|
-
├──
|
39
|
-
├──
|
40
|
-
├──
|
41
|
-
├──
|
42
|
-
├──
|
43
|
-
├──
|
44
|
-
├──
|
45
|
-
├──
|
46
|
-
├──
|
47
|
-
├──
|
48
|
-
├──
|
49
|
-
├──
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
├──
|
56
|
-
├──
|
57
|
-
├──
|
58
|
-
├──
|
59
|
-
├──
|
60
|
-
|
61
|
-
|
62
|
-
├──
|
63
|
-
|
64
|
-
├── 📦 auth
|
65
|
-
│ └── 🔷 classes: AuthBase, HTTPBasicAuth, HTTPDigestAuth, HTTPProxyAuth
|
66
|
-
├── 📦 certs
|
67
|
-
├── 📦 compat
|
68
|
-
├── 📦 cookies
|
69
|
-
├── 📦 exceptions
|
70
|
-
├── 📦 help
|
71
|
-
├── 📦 hooks
|
72
|
-
├── 📦 models
|
73
|
-
├── 📦 sessions
|
74
|
-
├── 📦 status_codes
|
75
|
-
├── 📦 structures
|
76
|
-
└── 📦 utils
|
38
|
+
# Inspect function signatures (even if the package is not installed)
|
39
|
+
» uv run pretty-mod sig fastmcp:FastMCP --quiet
|
40
|
+
📎 FastMCP
|
41
|
+
├── Parameters:
|
42
|
+
├── self
|
43
|
+
├── name: str | None=None
|
44
|
+
├── instructions: str | None=None
|
45
|
+
├── auth: OAuthProvider | None=None
|
46
|
+
├── lifespan: Callable[[FastMCP[LifespanResultT]], AbstractAsyncContextManager[LifespanResultT]] | None=None
|
47
|
+
├── tool_serializer: Callable[[Any], str] | None=None
|
48
|
+
├── cache_expiration_seconds: float | None=None
|
49
|
+
├── on_duplicate_tools: DuplicateBehavior | None=None
|
50
|
+
├── on_duplicate_resources: DuplicateBehavior | None=None
|
51
|
+
├── on_duplicate_prompts: DuplicateBehavior | None=None
|
52
|
+
├── resource_prefix_format: Literal['protocol', 'path'] | None=None
|
53
|
+
├── mask_error_details: bool | None=None
|
54
|
+
├── tools: list[Tool | Callable[..., Any]] | None=None
|
55
|
+
├── dependencies: list[str] | None=None
|
56
|
+
├── include_tags: set[str] | None=None
|
57
|
+
├── exclude_tags: set[str] | None=None
|
58
|
+
├── log_level: str | None=None
|
59
|
+
├── debug: bool | None=None
|
60
|
+
├── host: str | None=None
|
61
|
+
├── port: int | None=None
|
62
|
+
├── sse_path: str | None=None
|
63
|
+
├── message_path: str | None=None
|
64
|
+
├── streamable_http_path: str | None=None
|
65
|
+
├── json_response: bool | None=None
|
66
|
+
└── stateless_http: bool | None=None
|
77
67
|
```
|
78
68
|
|
79
|
-
##
|
69
|
+
## installation
|
80
70
|
|
81
71
|
```bash
|
82
72
|
uv add pretty-mod
|
83
73
|
```
|
84
74
|
|
85
|
-
|
75
|
+
|
76
|
+
## cli
|
77
|
+
|
78
|
+
`pretty-mod` includes a command-line interface for shell-based exploration:
|
79
|
+
|
80
|
+
> [!IMPORTANT]
|
81
|
+
> all commands below can be run ephemerally with `uvx`, e.g. `uvx pretty-mod tree json`
|
82
|
+
|
83
|
+
```bash
|
84
|
+
# Explore module structure
|
85
|
+
pretty-mod tree json
|
86
|
+
|
87
|
+
# Go deeper into the tree with --depth
|
88
|
+
pretty-mod tree requests --depth 3
|
89
|
+
|
90
|
+
# Display function signatures
|
91
|
+
pretty-mod sig json:loads
|
92
|
+
pretty-mod sig os.path:join
|
93
|
+
|
94
|
+
# Explore packages even without having them installed
|
95
|
+
pretty-mod tree django
|
96
|
+
pretty-mod tree flask --depth 1
|
97
|
+
|
98
|
+
# Use --quiet to suppress download messages
|
99
|
+
pretty-mod tree requests --quiet
|
100
|
+
|
101
|
+
# Version specifiers - explore specific versions
|
102
|
+
pretty-mod tree toml@0.10.2
|
103
|
+
pretty-mod sig toml@0.10.2:loads
|
104
|
+
|
105
|
+
# Submodules with version specifiers (correct syntax)
|
106
|
+
pretty-mod tree prefect.server@2.10.0 # ✅ Works
|
107
|
+
pretty-mod tree prefect@2.10.0.server # ❌ Invalid - version must come last
|
108
|
+
|
109
|
+
# Package name differs from module name
|
110
|
+
pretty-mod tree pydocket::docket # PyPI package 'pydocket' contains module 'docket'
|
111
|
+
pretty-mod tree pillow::PIL # PyPI package 'pillow' contains module 'PIL'
|
112
|
+
pretty-mod tree pillow::PIL@10.0.0 # Specific version of pillow
|
113
|
+
pretty-mod sig pillow::PIL.Image:open # Works with signatures too
|
114
|
+
```
|
115
|
+
|
116
|
+
## python sdk
|
86
117
|
|
87
118
|
```python
|
88
119
|
from pretty_mod import display_tree
|
@@ -134,45 +165,55 @@ print(display_signature("json:loads"))
|
|
134
165
|
```
|
135
166
|
</details>
|
136
167
|
|
137
|
-
##
|
168
|
+
## customization
|
138
169
|
|
139
|
-
|
170
|
+
pretty-mod supports extensive customization through environment variables:
|
140
171
|
|
141
|
-
|
142
|
-
> all commands below can be run ephemerally with `uvx`, e.g. `uvx pretty-mod tree json`
|
172
|
+
### display characters
|
143
173
|
|
144
174
|
```bash
|
145
|
-
#
|
146
|
-
pretty-mod tree json
|
147
|
-
|
148
|
-
# Go deeper into the tree with --depth
|
149
|
-
pretty-mod tree requests --depth 3
|
150
|
-
|
151
|
-
# Display function signatures
|
152
|
-
pretty-mod sig json:loads
|
153
|
-
pretty-mod sig os.path:join
|
175
|
+
# Use ASCII-only mode for terminals without Unicode support
|
176
|
+
PRETTY_MOD_ASCII=1 pretty-mod tree json
|
154
177
|
|
155
|
-
#
|
156
|
-
pretty-mod tree
|
157
|
-
pretty-mod tree
|
178
|
+
# Customize individual icons
|
179
|
+
PRETTY_MOD_MODULE_ICON="[M]" pretty-mod tree json
|
180
|
+
PRETTY_MOD_FUNCTION_ICON="fn" pretty-mod tree json
|
181
|
+
PRETTY_MOD_CLASS_ICON="cls" pretty-mod tree json
|
182
|
+
```
|
158
183
|
|
159
|
-
|
160
|
-
pretty-mod tree requests --quiet
|
184
|
+
### colors
|
161
185
|
|
162
|
-
|
163
|
-
pretty-mod tree toml@0.10.2
|
164
|
-
pretty-mod sig toml@0.10.2:loads
|
186
|
+
pretty-mod uses an earth-tone color scheme by default:
|
165
187
|
|
166
|
-
|
167
|
-
|
168
|
-
pretty-mod tree
|
188
|
+
```bash
|
189
|
+
# Disable colors entirely
|
190
|
+
PRETTY_MOD_NO_COLOR=1 pretty-mod tree json
|
191
|
+
# or use the standard NO_COLOR environment variable
|
192
|
+
NO_COLOR=1 pretty-mod tree json
|
193
|
+
|
194
|
+
# Override specific colors with hex values
|
195
|
+
PRETTY_MOD_MODULE_COLOR="#FF6B6B" pretty-mod tree json
|
196
|
+
PRETTY_MOD_FUNCTION_COLOR="#4ECDC4" pretty-mod tree json
|
169
197
|
```
|
170
198
|
|
171
|
-
|
199
|
+
available color environment variables:
|
200
|
+
- `PRETTY_MOD_MODULE_COLOR` - Modules/packages (default: #8B7355)
|
201
|
+
- `PRETTY_MOD_FUNCTION_COLOR` - Functions (default: #6B8E23)
|
202
|
+
- `PRETTY_MOD_CLASS_COLOR` - Classes (default: #4682B4)
|
203
|
+
- `PRETTY_MOD_CONSTANT_COLOR` - Constants (default: #BC8F8F)
|
204
|
+
- `PRETTY_MOD_EXPORTS_COLOR` - __all__ exports (default: #9370DB)
|
205
|
+
- `PRETTY_MOD_SIGNATURE_COLOR` - Signatures (default: #5F9EA0)
|
206
|
+
- `PRETTY_MOD_TREE_COLOR` - Tree structure lines (default: #696969)
|
207
|
+
- `PRETTY_MOD_PARAM_COLOR` - Parameter names (default: #708090)
|
208
|
+
- `PRETTY_MOD_TYPE_COLOR` - Type annotations (default: #778899)
|
209
|
+
- `PRETTY_MOD_DEFAULT_COLOR` - Default values (default: #8FBC8F)
|
210
|
+
- `PRETTY_MOD_WARNING_COLOR` - Warning messages (default: #DAA520)
|
211
|
+
|
212
|
+
## examples
|
172
213
|
|
173
|
-
|
214
|
+
see the [`examples/`](examples/) directory for more detailed usage patterns and advanced features.
|
174
215
|
|
175
|
-
##
|
216
|
+
## development
|
176
217
|
|
177
218
|
```bash
|
178
219
|
gh repo clone zzstoatzz/pretty-mod && cd pretty-mod
|
@@ -1,12 +1,12 @@
|
|
1
|
-
pretty_mod-0.
|
2
|
-
pretty_mod-0.
|
3
|
-
pretty_mod-0.
|
4
|
-
pretty_mod-0.
|
1
|
+
pretty_mod-0.2.0.dist-info/METADATA,sha256=vuwrFXS05ULYzy_zoaE2lmbqNmz9Lg6iiXX3nfwNHSo,8277
|
2
|
+
pretty_mod-0.2.0.dist-info/WHEEL,sha256=kSbATYhSt397kCW6QKSHILP8Mo1R6J9_687UV4low5A,105
|
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=t4-aJACJSRrl4B6UnAoE9JRQY_uacSfllsrgf0ezefo,1067
|
5
5
|
pretty_mod.libs/libgcc_s-b5472b99.so.1,sha256=wh8CpjXz9IccAyeERcB7YDEx7NH2jF-PykwOyYNeRRI,453841
|
6
6
|
pretty_mod/__init__.py,sha256=jVcaTvbU6PZ2b_el4hnF_mmc-thfDOpTvePOS3n4D9c,103
|
7
|
-
pretty_mod/_pretty_mod.cpython-311-i386-linux-musl.so,sha256=
|
7
|
+
pretty_mod/_pretty_mod.cpython-311-i386-linux-musl.so,sha256=YoUXpmonP89rZsUURLu3CfRpd6SsyyBMM3TYmGcmta0,6827265
|
8
8
|
pretty_mod/_pretty_mod.pyi,sha256=OQs08-sWtiBpXJJvmkue80v5x3rYIsGocQKx6osMRZw,662
|
9
9
|
pretty_mod/cli.py,sha256=pehQfJ3KKrv0KRaU9JtTtl3x84wRDCyU-5mEPjVKbcA,1610
|
10
10
|
pretty_mod/explorer.py,sha256=dWSZi4QH-JvhF8AlKcfpDOrx3-ijsHhhn8tcEsRPYH8,258
|
11
11
|
pretty_mod/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
|
-
pretty_mod-0.
|
12
|
+
pretty_mod-0.2.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|