shinyshell 0.2.0__tar.gz → 0.2.2__tar.gz
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.
- shinyshell-0.2.2/PKG-INFO +545 -0
- shinyshell-0.2.2/README.md +501 -0
- shinyshell-0.2.2/setup.py +52 -0
- {shinyshell-0.2.0 → shinyshell-0.2.2}/shinyshell/__init__.py +1 -1
- shinyshell-0.2.2/shinyshell.egg-info/PKG-INFO +545 -0
- shinyshell-0.2.0/PKG-INFO +0 -207
- shinyshell-0.2.0/README.md +0 -175
- shinyshell-0.2.0/setup.py +0 -32
- shinyshell-0.2.0/shinyshell.egg-info/PKG-INFO +0 -207
- {shinyshell-0.2.0 → shinyshell-0.2.2}/LICENSE +0 -0
- {shinyshell-0.2.0 → shinyshell-0.2.2}/setup.cfg +0 -0
- {shinyshell-0.2.0 → shinyshell-0.2.2}/shinyshell/banner.py +0 -0
- {shinyshell-0.2.0 → shinyshell-0.2.2}/shinyshell.egg-info/SOURCES.txt +0 -0
- {shinyshell-0.2.0 → shinyshell-0.2.2}/shinyshell.egg-info/dependency_links.txt +0 -0
- {shinyshell-0.2.0 → shinyshell-0.2.2}/shinyshell.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: shinyshell
|
|
3
|
+
Version: 0.2.2
|
|
4
|
+
Summary: Python library for beautiful terminal output — colored printing, tables, progress bars, syntax highlighting, bar charts, QR codes, and more. Zero dependencies.
|
|
5
|
+
Home-page: https://github.com/adnanahamed66772ndpc/shinyshell
|
|
6
|
+
Author: Adnan Ahamed Himal
|
|
7
|
+
Author-email: hello@adnanahamedhimal.com
|
|
8
|
+
Project-URL: Source, https://github.com/adnanahamed66772ndpc/shinyshell
|
|
9
|
+
Project-URL: Bug Reports, https://github.com/adnanahamed66772ndpc/shinyshell/issues
|
|
10
|
+
Project-URL: Documentation, https://github.com/adnanahamed66772ndpc/shinyshell#readme
|
|
11
|
+
Keywords: terminal,cli,console,pretty,beautiful,output,print,colors,ansi,progress bar,table,spinner,syntax highlighting,diff,json,bar chart,qr code,ascii art,markdown,debug,trace,logging,bash,shell,colored,formatting,rich,colorama,termcolor,python library,python package,python cli,python terminal,developer tools,devtools,zero dependency
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: System Administrators
|
|
15
|
+
Classifier: Intended Audience :: Information Technology
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
|
+
Classifier: Topic :: Terminals
|
|
26
|
+
Classifier: Topic :: Software Development :: User Interfaces
|
|
27
|
+
Classifier: Topic :: Utilities
|
|
28
|
+
Classifier: Environment :: Console
|
|
29
|
+
Classifier: Operating System :: OS Independent
|
|
30
|
+
Requires-Python: >=3.8
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
License-File: LICENSE
|
|
33
|
+
Dynamic: author
|
|
34
|
+
Dynamic: author-email
|
|
35
|
+
Dynamic: classifier
|
|
36
|
+
Dynamic: description
|
|
37
|
+
Dynamic: description-content-type
|
|
38
|
+
Dynamic: home-page
|
|
39
|
+
Dynamic: keywords
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
Dynamic: project-url
|
|
42
|
+
Dynamic: requires-python
|
|
43
|
+
Dynamic: summary
|
|
44
|
+
|
|
45
|
+
# ✨ shinyshell — Beautiful Terminal Output Library for Python
|
|
46
|
+
|
|
47
|
+
<p align="center">
|
|
48
|
+
<b>Python library for beautiful CLI output, colored terminal printing, progress bars,<br>
|
|
49
|
+
tables, syntax highlighting, ASCII art, and interactive prompts — all with zero dependencies.</b><br>
|
|
50
|
+
<i>One import. 38 features. Pure Python stdlib. No pip install headaches.</i>
|
|
51
|
+
</p>
|
|
52
|
+
|
|
53
|
+
<p align="center">
|
|
54
|
+
<a href="https://pypi.org/project/shinyshell/"><img src="https://img.shields.io/pypi/v/shinyshell?color=green&label=PyPI" alt="PyPI"></a>
|
|
55
|
+
<a href="https://pypi.org/project/shinyshell/"><img src="https://img.shields.io/pypi/pyversions/shinyshell" alt="Python Versions"></a>
|
|
56
|
+
<a href="https://github.com/adnanahamed66772ndpc/shinyshell/blob/main/LICENSE"><img src="https://img.shields.io/github/license/adnanahamed66772ndpc/shinyshell" alt="MIT License"></a>
|
|
57
|
+
<a href="https://pypi.org/project/shinyshell/"><img src="https://img.shields.io/pypi/dm/shinyshell" alt="Downloads"></a>
|
|
58
|
+
<a href="https://github.com/adnanahamed66772ndpc/shinyshell"><img src="https://img.shields.io/github/stars/adnanahamed66772ndpc/shinyshell?style=social" alt="GitHub Stars"></a>
|
|
59
|
+
</p>
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 📦 Why shinyshell?
|
|
64
|
+
|
|
65
|
+
- **Zero dependencies** — uses only Python standard library (`os`, `sys`, `shutil`)
|
|
66
|
+
- **38 built-in features** — tables, progress bars, code highlighting, diff viewer, JSON formatter, bar charts, QR codes, ASCII art, and more
|
|
67
|
+
- **Cross-platform** — Linux, macOS, Windows Terminal, PowerShell, CMD, VS Code, PyCharm
|
|
68
|
+
- **Beginner-friendly** — one import, intuitive API, no configuration needed
|
|
69
|
+
- **Production-ready** — works in scripts, CLIs, CI/CD pipelines, Docker containers
|
|
70
|
+
- **Lightweight** — ~950 lines of code, installs in seconds
|
|
71
|
+
|
|
72
|
+
### Use Cases
|
|
73
|
+
|
|
74
|
+
| Use Case | Features You'll Use |
|
|
75
|
+
|----------|-------------------|
|
|
76
|
+
| **CLI tool developer** | progress bars, spinners, headers, tables, confirm dialogs |
|
|
77
|
+
| **Data scientist** | tables, bar charts, metrics dashboard, JSON viewer |
|
|
78
|
+
| **DevOps engineer** | colored messages, benchmarks, env viewer, code blocks |
|
|
79
|
+
| **Backend developer** | debug(), trace(), diff viewer, secret masking |
|
|
80
|
+
| **Student/learner** | markdown renderer, ASCII art, QR codes, emoji helper |
|
|
81
|
+
|
|
82
|
+
### vs Alternatives
|
|
83
|
+
|
|
84
|
+
| | shinyshell | rich | colorama | termcolor |
|
|
85
|
+
|---|-----------|------|----------|-----------|
|
|
86
|
+
| Dependencies | **0** | 10+ | 0 | 0 |
|
|
87
|
+
| Features | **38** | 50+ | 3 | 5 |
|
|
88
|
+
| Install size | **~25KB** | ~50MB | ~20KB | ~15KB |
|
|
89
|
+
| Tables | ✅ | ✅ | ❌ | ❌ |
|
|
90
|
+
| Progress bars | ✅ | ✅ | ❌ | ❌ |
|
|
91
|
+
| Code highlight | ✅ | ✅ | ❌ | ❌ |
|
|
92
|
+
| Bar charts | ✅ | ❌ | ❌ | ❌ |
|
|
93
|
+
| Timeline | ✅ | ❌ | ❌ | ❌ |
|
|
94
|
+
| QR codes | ✅ | ❌ | ❌ | ❌ |
|
|
95
|
+
| Debug/trace | ✅ | ❌ | ❌ | ❌ |
|
|
96
|
+
| Interactive | ✅ | ✅ | ❌ | ❌ |
|
|
97
|
+
|
|
98
|
+
> **shinyshell** is the sweet spot: ***rich's feature set with colorama's simplicity***.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 📦 Install
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
pip install shinyshell
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
That's it. No dependencies. Works everywhere: **Linux, macOS, Windows (PowerShell/CMD/Terminal)**.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 🚀 Quick Start
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
from shinyshell import Shell
|
|
116
|
+
|
|
117
|
+
sh = Shell()
|
|
118
|
+
|
|
119
|
+
# Basic messages
|
|
120
|
+
sh.success("Database migrated!")
|
|
121
|
+
sh.error("Connection failed")
|
|
122
|
+
sh.warning("Disk usage at 92%")
|
|
123
|
+
sh.info("Server running on port 8000")
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Output:**
|
|
127
|
+
```
|
|
128
|
+
✨ Database migrated!
|
|
129
|
+
💥 Connection failed
|
|
130
|
+
⚠️ Disk usage at 92%
|
|
131
|
+
ℹ️ Server running on port 8000
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 📚 Complete Feature Reference
|
|
137
|
+
|
|
138
|
+
### 1. Headers & Banners
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
# Level 1 header (boxed)
|
|
142
|
+
sh.header("DEPLOYMENT REPORT")
|
|
143
|
+
|
|
144
|
+
# Level 2 header (simple)
|
|
145
|
+
sh.header("Configuration", level=2)
|
|
146
|
+
|
|
147
|
+
# ASCII banner
|
|
148
|
+
sh.banner("SHINY")
|
|
149
|
+
sh.banner("HELLO", color="magenta")
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### 2. Status Messages
|
|
153
|
+
|
|
154
|
+
```python
|
|
155
|
+
sh.success("Build completed!") # Green, checkmark
|
|
156
|
+
sh.error("API returned 500") # Red, cross
|
|
157
|
+
sh.warning("Memory at 85%") # Yellow, triangle
|
|
158
|
+
sh.info("Listening on :8000") # Cyan, info circle
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### 3. Horizontal Rules
|
|
162
|
+
|
|
163
|
+
```python
|
|
164
|
+
# Simple divider
|
|
165
|
+
sh.hr()
|
|
166
|
+
|
|
167
|
+
# Labeled divider
|
|
168
|
+
sh.hr("Section 2")
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### 4. Tables
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
users = [
|
|
175
|
+
{"Name": "Alice Chen", "Role": "Backend", "Status": "Active"},
|
|
176
|
+
{"Name": "Bob Kumar", "Role": "Frontend", "Status": "On Leave"},
|
|
177
|
+
{"Name": "Carol Diaz", "Role": "DevOps", "Status": "Active"},
|
|
178
|
+
]
|
|
179
|
+
|
|
180
|
+
sh.table(users, title="Team Members")
|
|
181
|
+
|
|
182
|
+
# Border styles: single, double, round, bold, dashed
|
|
183
|
+
sh.table(data, style="round")
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### 5. Metrics Dashboard
|
|
187
|
+
|
|
188
|
+
```python
|
|
189
|
+
sh.metrics({
|
|
190
|
+
"Users": 12483,
|
|
191
|
+
"Active Now": 342,
|
|
192
|
+
"Uptime": "✅ 99.9%",
|
|
193
|
+
"Error Rate": "0.02%",
|
|
194
|
+
"Avg Response": "23ms",
|
|
195
|
+
})
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### 6. Boxed Content
|
|
199
|
+
|
|
200
|
+
```python
|
|
201
|
+
sh.box(
|
|
202
|
+
"API Key: sk-****abcd\nEndpoint: /v1/chat\nModel: deepseek-v4",
|
|
203
|
+
title="Configuration"
|
|
204
|
+
)
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### 7. Code Blocks
|
|
208
|
+
|
|
209
|
+
```python
|
|
210
|
+
sh.code("""
|
|
211
|
+
def fibonacci(n):
|
|
212
|
+
# Base case
|
|
213
|
+
if n <= 1:
|
|
214
|
+
return n
|
|
215
|
+
return fibonacci(n-1) + fibonacci(n-2)
|
|
216
|
+
""")
|
|
217
|
+
|
|
218
|
+
# Supports Python keywords, strings, numbers, comments
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### 8. Colored Diff
|
|
222
|
+
|
|
223
|
+
```python
|
|
224
|
+
old_code = "def greet(name):\n return 'Hello'"
|
|
225
|
+
new_code = "def greet(name, title=''):\n return f'Hello {title} {name}'"
|
|
226
|
+
|
|
227
|
+
sh.diff(old_code, new_code, old_label="v1.py", new_label="v2.py")
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### 9. Directory Tree
|
|
231
|
+
|
|
232
|
+
```python
|
|
233
|
+
sh.tree("./myproject")
|
|
234
|
+
sh.tree("./src", max_depth=2)
|
|
235
|
+
sh.tree(".", exclude=["node_modules", ".git", "__pycache__"])
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### 10. JSON Pretty Print
|
|
239
|
+
|
|
240
|
+
```python
|
|
241
|
+
sh.json({
|
|
242
|
+
"user": {"name": "Alice", "age": 30, "active": True},
|
|
243
|
+
"stats": {"posts": 142, "followers": 1200},
|
|
244
|
+
})
|
|
245
|
+
# Syntax-colored output: green keys, yellow strings, cyan numbers, magenta booleans
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### 11. Markdown Rendering
|
|
249
|
+
|
|
250
|
+
```python
|
|
251
|
+
sh.markdown("""
|
|
252
|
+
# Main Title
|
|
253
|
+
## Subtitle
|
|
254
|
+
### Section
|
|
255
|
+
|
|
256
|
+
- Bullet point one
|
|
257
|
+
- Bullet point two
|
|
258
|
+
|
|
259
|
+
> This is a blockquote
|
|
260
|
+
|
|
261
|
+
**Bold text**
|
|
262
|
+
""")
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### 12. Bar Charts
|
|
266
|
+
|
|
267
|
+
```python
|
|
268
|
+
sh.bar({
|
|
269
|
+
"Python": 85,
|
|
270
|
+
"JavaScript": 62,
|
|
271
|
+
"Go": 45,
|
|
272
|
+
"Rust": 38,
|
|
273
|
+
"Ruby": 22,
|
|
274
|
+
}, title="Language Usage", color="magenta")
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### 13. Timeline
|
|
278
|
+
|
|
279
|
+
```python
|
|
280
|
+
sh.timeline([
|
|
281
|
+
{"date": "Jan 2024", "title": "v1.0 Released", "desc": "Initial launch with 17 features"},
|
|
282
|
+
{"date": "Mar 2024", "title": "v1.5 Update", "desc": "Added tables and metrics"},
|
|
283
|
+
{"date": "Jun 2024", "title": "v2.0 Major", "desc": "19 new features added"},
|
|
284
|
+
])
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### 14. Columns
|
|
288
|
+
|
|
289
|
+
```python
|
|
290
|
+
features = ["success()", "error()", "table()", "code()", "tree()",
|
|
291
|
+
"diff()", "json()", "bar()", "qr()", "live()"]
|
|
292
|
+
|
|
293
|
+
sh.columns(features, cols=3)
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### 15. Badges
|
|
297
|
+
|
|
298
|
+
```python
|
|
299
|
+
print(sh.badge("v2.0", "green"))
|
|
300
|
+
print(sh.badge("BETA", "yellow"))
|
|
301
|
+
print(sh.badge("ERROR", "red"))
|
|
302
|
+
print(sh.badge("INFO", "cyan"))
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### 16. QR Codes
|
|
306
|
+
|
|
307
|
+
```python
|
|
308
|
+
sh.qr("https://github.com/adnanahamed66772ndpc/shinyshell", title="Scan to visit repo")
|
|
309
|
+
sh.qr("Hello World")
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### 17. Clickable Links
|
|
313
|
+
|
|
314
|
+
```python
|
|
315
|
+
print(sh.link("Visit GitHub", "https://github.com/adnanahamed66772ndpc/shinyshell"))
|
|
316
|
+
print(sh.link("Documentation", "https://pypi.org/project/shinyshell/"))
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### 18. Secret Masking
|
|
320
|
+
|
|
321
|
+
```python
|
|
322
|
+
print(sh.secret("sk-abc123def456ghi789")) # Output: sk-a****i789
|
|
323
|
+
print(sh.secret("my-password-here", visible=2)) # Output: my********re
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### 19. Emoji Lookup
|
|
327
|
+
|
|
328
|
+
```python
|
|
329
|
+
print(sh.emoji("rocket")) # 🚀
|
|
330
|
+
print(sh.emoji("fire")) # 🔥
|
|
331
|
+
print(sh.emoji("star")) # ⭐
|
|
332
|
+
print(sh.emoji("party")) # 🎉
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### 20. Environment Variables
|
|
336
|
+
|
|
337
|
+
```python
|
|
338
|
+
# Show all env vars
|
|
339
|
+
sh.env()
|
|
340
|
+
|
|
341
|
+
# Filter by prefix
|
|
342
|
+
sh.env("PYTHON")
|
|
343
|
+
sh.env("AWS_")
|
|
344
|
+
|
|
345
|
+
# Security: KEY, SECRET, TOKEN, PASSWORD values are auto-masked
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### 21. Version Info
|
|
349
|
+
|
|
350
|
+
```python
|
|
351
|
+
sh.version()
|
|
352
|
+
# Output: Python, OS, shinyshell version, terminal size, color support
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### 22. Debug
|
|
356
|
+
|
|
357
|
+
```python
|
|
358
|
+
user = {"name": "Alice", "age": 30}
|
|
359
|
+
status = "active"
|
|
360
|
+
|
|
361
|
+
sh.debug(user, status)
|
|
362
|
+
|
|
363
|
+
# Output:
|
|
364
|
+
# 🔍 app.py:42
|
|
365
|
+
# arg0 dict {'name': 'Alice', 'age': 30}
|
|
366
|
+
# arg1 str 'active'
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
### 23. Benchmark
|
|
372
|
+
|
|
373
|
+
```python
|
|
374
|
+
with sh.benchmark("Processing data"):
|
|
375
|
+
# Your heavy computation here
|
|
376
|
+
data = [i**2 for i in range(1000000)]
|
|
377
|
+
|
|
378
|
+
# Output:
|
|
379
|
+
# ⏱️ Processing data ........ 0.12s
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### 24. Progress Bar
|
|
383
|
+
|
|
384
|
+
```python
|
|
385
|
+
update = sh.progress("Uploading files")
|
|
386
|
+
for i in range(100):
|
|
387
|
+
time.sleep(0.02)
|
|
388
|
+
update(i + 1, 100)
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### 25. Steps Tracker
|
|
392
|
+
|
|
393
|
+
```python
|
|
394
|
+
step = sh.steps("Deploy to Production", total=5)
|
|
395
|
+
|
|
396
|
+
step("Building Docker image...")
|
|
397
|
+
step("Running tests...")
|
|
398
|
+
step("Pushing to registry...")
|
|
399
|
+
step("Updating service...")
|
|
400
|
+
step("Health check...")
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### 26. Animated Spinner
|
|
404
|
+
|
|
405
|
+
```python
|
|
406
|
+
sh.spinner("Installing dependencies...", duration=2.0)
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### 27. Countdown
|
|
410
|
+
|
|
411
|
+
```python
|
|
412
|
+
sh.countdown(5, "Launching rocket")
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### 28. Live Display
|
|
416
|
+
|
|
417
|
+
```python
|
|
418
|
+
with sh.live() as display:
|
|
419
|
+
for i in range(100):
|
|
420
|
+
display(f"Processing... {i+1}%")
|
|
421
|
+
time.sleep(0.03)
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
### 29. Confirm (Yes/No)
|
|
425
|
+
|
|
426
|
+
```python
|
|
427
|
+
if sh.confirm("Deploy to production?"):
|
|
428
|
+
sh.success("Deploying...")
|
|
429
|
+
else:
|
|
430
|
+
sh.info("Deployment cancelled")
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
### 30. Choice (Pick from options)
|
|
434
|
+
|
|
435
|
+
```python
|
|
436
|
+
env = sh.choice("Select environment:", ["Development", "Staging", "Production"])
|
|
437
|
+
sh.info(f"Selected: {env}")
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
### 31. Function Trace Decorator
|
|
441
|
+
|
|
442
|
+
```python
|
|
443
|
+
@sh.trace
|
|
444
|
+
def process_data(items):
|
|
445
|
+
return len(items) * 2
|
|
446
|
+
|
|
447
|
+
result = process_data([1, 2, 3, 4, 5])
|
|
448
|
+
|
|
449
|
+
# Output:
|
|
450
|
+
# ⚙️ process_data([1, 2, 3, 4, 5]) → 0.001s
|
|
451
|
+
|
|
452
|
+
# Disable argument logging for sensitive functions:
|
|
453
|
+
@sh.trace(log_args=False)
|
|
454
|
+
def login(username, password):
|
|
455
|
+
return True
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
### 32. Image to ASCII Art
|
|
459
|
+
|
|
460
|
+
```python
|
|
461
|
+
sh.image("screenshot.png", width=80)
|
|
462
|
+
sh.image("logo.jpg", width=60)
|
|
463
|
+
|
|
464
|
+
# Requires: pip install Pillow (optional)
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
### 33. Gradient Ruler
|
|
468
|
+
|
|
469
|
+
```python
|
|
470
|
+
sh.rule()
|
|
471
|
+
sh.rule("API Response")
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
## 🔧 Configuration
|
|
477
|
+
|
|
478
|
+
```python
|
|
479
|
+
sh = Shell(
|
|
480
|
+
color=True, # Enable/disable ANSI colors
|
|
481
|
+
width=100, # Custom terminal width
|
|
482
|
+
)
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
487
|
+
## 📊 Feature Summary
|
|
488
|
+
|
|
489
|
+
| Category | Features |
|
|
490
|
+
|----------|----------|
|
|
491
|
+
| Messages | `success`, `error`, `warning`, `info` |
|
|
492
|
+
| Layout | `header`, `banner`, `hr`, `rule`, `box` |
|
|
493
|
+
| Data Display | `table`, `metrics`, `json`, `bar`, `timeline`, `columns` |
|
|
494
|
+
| Code | `code`, `diff`, `markdown` |
|
|
495
|
+
| Progress | `spinner`, `progress`, `steps`, `countdown`, `benchmark`, `live` |
|
|
496
|
+
| Interactive | `confirm`, `choice` |
|
|
497
|
+
| Debug | `debug`, `trace`, `version`, `env` |
|
|
498
|
+
| Files | `tree`, `image` |
|
|
499
|
+
| Utilities | `badge`, `secret`, `link`, `emoji`, `qr` |
|
|
500
|
+
| **Total** | **38 features, 0 dependencies, ~950 lines** |
|
|
501
|
+
|
|
502
|
+
---
|
|
503
|
+
|
|
504
|
+
## 🌍 Platform Support
|
|
505
|
+
|
|
506
|
+
| Platform | Status |
|
|
507
|
+
|----------|--------|
|
|
508
|
+
| Linux (GNOME/KDE/tmux) | ✅ Full |
|
|
509
|
+
| macOS (Terminal/iTerm2) | ✅ Full |
|
|
510
|
+
| Windows Terminal | ✅ Full |
|
|
511
|
+
| Windows PowerShell | ✅ Full |
|
|
512
|
+
| Windows CMD | ✅ Full (Win 10+) |
|
|
513
|
+
| VS Code Terminal | ✅ Full |
|
|
514
|
+
| JetBrains Terminal | ✅ Full |
|
|
515
|
+
| CI/CD (GitHub Actions) | ✅ Full |
|
|
516
|
+
|
|
517
|
+
---
|
|
518
|
+
|
|
519
|
+
## 🤝 Contributing
|
|
520
|
+
|
|
521
|
+
```bash
|
|
522
|
+
git clone https://github.com/adnanahamed66772ndpc/shinyshell.git
|
|
523
|
+
cd shinyshell
|
|
524
|
+
pip install -e .
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
Pull requests welcome! Check [issues](https://github.com/adnanahamed66772ndpc/shinyshell/issues) for ideas.
|
|
528
|
+
|
|
529
|
+
---
|
|
530
|
+
|
|
531
|
+
## 📄 License
|
|
532
|
+
|
|
533
|
+
MIT — © 2026 [Adnan Ahamed Himal](https://adnanahamedhimal.com)
|
|
534
|
+
|
|
535
|
+
---
|
|
536
|
+
|
|
537
|
+
## ⭐ Support
|
|
538
|
+
|
|
539
|
+
If this library saved you time, **give it a star** on GitHub. It helps others find it too!
|
|
540
|
+
|
|
541
|
+
<p align="center">
|
|
542
|
+
<a href="https://github.com/adnanahamed66772ndpc/shinyshell">⭐ Star on GitHub</a>
|
|
543
|
+
·
|
|
544
|
+
<a href="https://pypi.org/project/shinyshell/">📦 View on PyPI</a>
|
|
545
|
+
</p>
|