Metadata-Version: 2.4
Name: simplesuit
Version: 0.1.0
Summary: Small terminal helpers: 24-bit colors, Nerd Font icons, a JSON file used as a dict, and system info
Author: Izac
License-Expression: MIT
Project-URL: Homepage, https://libs.zazac.link/simplesuit/
Project-URL: Documentation, https://libs.zazac.link/simplesuit/
Keywords: terminal,colors,ansi,gradient,nerd-fonts,icons,json,system-info
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: French
Classifier: Topic :: Terminals
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: psutil>=5.9
Dynamic: license-file

# simplesuit — small helpers for the terminal

Four small modules in one package: **24-bit colors**, **Nerd Font icons**, **a JSON file used as a dict**,
and **system info**. Python 3.9+. Each module is only loaded when you import it.

```bash
pip install simplesuit
```

```python
from simplesuit import colors as sc   # 24-bit colors, gradients, styles
from simplesuit import icons as si    # Nerd Font icons
from simplesuit import json as sj     # a JSON file that behaves like a small persistent dict
from simplesuit import sys as ss      # battery, CPU, RAM, disk, network, sound
```

Error messages and comments are in French. Full documentation with examples:
**[libs.zazac.link/simplesuit](https://libs.zazac.link/simplesuit/)**.

## colors

```python
print(sc.color("Hello", "tomato", styles="bold"))   # by name, "#FF6347", "rgb(255,99,71)" or (255, 99, 71)
print(sc.red("error"))                              # every color name is also a function
print(sc.gradient("orsh", "cyan", "magenta"))       # letter-by-letter gradient, any number of colors
sc.show_palette()                                   # the 246 available colors
```

Typos get suggestions: `unknown color: tomatto (did you mean: tomato ?)`.

## icons

Needs a [Nerd Font](https://www.nerdfonts.com/) in your terminal.

```python
print(si.icon("python", "yellow"), si.apple)
print(si.battery(64, plugged=True), si.file_icon("main.py"))
print(si.spinner(3))       # frame n°3 of a loading animation
```

## json

Relative paths start from the folder of the script being run; the default file is `data.json`.

```python
sj.put("theme", "dark")
sj.get("theme")                 # "dark"
sj.get("lang", default="fr")    # "fr"
sj.set("scores.json")           # switch file for the next calls
```

## sys

Made for macOS (sound, Wi-Fi name); the rest also works on Linux and Windows. Uses `psutil`.

```python
ss.battery(), ss.cpu(), ss.ram_used(), ss.disk_free(), ss.local_ip()
ss.summary()    # everything in one dict
```

## License

MIT
