pretty-mod 0.1.2__cp311-cp311-macosx_11_0_arm64.whl → 0.2.0__cp311-cp311-macosx_11_0_arm64.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pretty-mod
3
- Version: 0.1.2
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
- » uvx pretty-mod sig json:dumps
37
- 📎 dumps
38
- ├── Parameters:
39
- ├── obj
40
- ├── *
41
- ├── skipkeys=False
42
- ├── ensure_ascii=True
43
- ├── check_circular=True
44
- ├── allow_nan=True
45
- ├── cls=None
46
- ├── indent=None
47
- ├── separators=None
48
- ├── default=None
49
- ├── sort_keys=False
50
- └── **kw
51
-
52
- # Auto-download packages from PyPI (no install needed!)
53
- » uvx pretty-mod tree requests --quiet
54
- 📦 requests
55
- ├── 📜 __all__: delete, get, head, options, patch, post, put, request
56
- ├── ⚡ functions: check_compatibility, delete, get, head, options, patch, post, put, request
57
- ├── 🔷 classes: ConnectTimeout, ConnectionError, DependencyWarning, FileModeWarning, HTTPError, JSONDecodeError, NullHandler, PreparedRequest, ReadTimeout, Request, RequestException, RequestsDependencyWarning, Response, Session, Timeout, TooManyRedirects, URLRequired
58
- ├── 📌 constants: __author__, __author_email__, __build__, __cake__, __copyright__, __description__, __license__, __title__, __url__, codes
59
- ├── 📦 adapters
60
- ├── 🔷 classes: BaseAdapter, HTTPAdapter
61
- │ └── 📌 constants: DEFAULT_POOL_TIMEOUT, DEFAULT_POOLBLOCK, DEFAULT_POOLSIZE, DEFAULT_RETRIES
62
- ├── 📦 api
63
- └── ⚡ functions: delete, get, head, options, patch, post, put, request
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
- ## Installation
69
+ ## installation
80
70
 
81
71
  ```bash
82
72
  uv add pretty-mod
83
73
  ```
84
74
 
85
- ## Usage
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
- ## CLI
168
+ ## customization
138
169
 
139
- Pretty-mod includes a command-line interface for quick exploration:
170
+ pretty-mod supports extensive customization through environment variables:
140
171
 
141
- > [!IMPORTANT]
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
- # Explore module structure
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
- # Explore packages even without having them installed
156
- pretty-mod tree django
157
- pretty-mod tree flask --depth 1
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
- # Use --quiet to suppress download messages
160
- pretty-mod tree requests --quiet
184
+ ### colors
161
185
 
162
- # Version specifiers - explore specific versions
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
- # Submodules with version specifiers (correct syntax)
167
- pretty-mod tree prefect.server@2.10.0 # ✅ Works
168
- pretty-mod tree prefect@2.10.0.server # ❌ Invalid - version must come last
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
- ## Examples
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
- See the [`examples/`](examples/) directory for more detailed usage patterns and advanced features.
214
+ see the [`examples/`](examples/) directory for more detailed usage patterns and advanced features.
174
215
 
175
- ## Development
216
+ ## development
176
217
 
177
218
  ```bash
178
219
  gh repo clone zzstoatzz/pretty-mod && cd pretty-mod
@@ -1,11 +1,11 @@
1
- pretty_mod-0.1.2.dist-info/METADATA,sha256=qMNGAxnmLoRU8k8hbfaCP-pkJxcmXphn6EyqM2lfJnY,6599
2
- pretty_mod-0.1.2.dist-info/WHEEL,sha256=8hL2oHqulIPF_TJ_OfB-8kD2X9O6HJL0emTmeguFbqc,104
3
- pretty_mod-0.1.2.dist-info/entry_points.txt,sha256=aNlomjGTypAOUeZiSZ4OYFY-QVq2KmDXkO9QFS45uW4,49
4
- pretty_mod-0.1.2.dist-info/licenses/LICENSE,sha256=t4-aJACJSRrl4B6UnAoE9JRQY_uacSfllsrgf0ezefo,1067
1
+ pretty_mod-0.2.0.dist-info/METADATA,sha256=vuwrFXS05ULYzy_zoaE2lmbqNmz9Lg6iiXX3nfwNHSo,8277
2
+ pretty_mod-0.2.0.dist-info/WHEEL,sha256=8hL2oHqulIPF_TJ_OfB-8kD2X9O6HJL0emTmeguFbqc,104
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/__init__.py,sha256=jVcaTvbU6PZ2b_el4hnF_mmc-thfDOpTvePOS3n4D9c,103
6
- pretty_mod/_pretty_mod.cpython-311-darwin.so,sha256=iHAV7qJ5E4H-siItKqeYRtbNwq_w9m98c28lGbCycR4,6236480
6
+ pretty_mod/_pretty_mod.cpython-311-darwin.so,sha256=KKmRsSPlVkTwY3Ws2Xx333hAs0wyGDFW3cqJFv5ImcY,6270352
7
7
  pretty_mod/_pretty_mod.pyi,sha256=OQs08-sWtiBpXJJvmkue80v5x3rYIsGocQKx6osMRZw,662
8
8
  pretty_mod/cli.py,sha256=pehQfJ3KKrv0KRaU9JtTtl3x84wRDCyU-5mEPjVKbcA,1610
9
9
  pretty_mod/explorer.py,sha256=dWSZi4QH-JvhF8AlKcfpDOrx3-ijsHhhn8tcEsRPYH8,258
10
10
  pretty_mod/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- pretty_mod-0.1.2.dist-info/RECORD,,
11
+ pretty_mod-0.2.0.dist-info/RECORD,,