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.
pip install simplesuit
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.
colors
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 in your terminal.
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.
sj.put("theme", "dark")
sj.get("theme") # "dark"
sj.get("lang", default="fr") # "fr"
sj.set("scores.json") # switch file for the next calls
sj.append("users", {"name": "Zoe"}) # add to the "users" list (created if missing)
sj.show() # pretty-print the file, with colors
sys
Made for macOS (sound, Wi-Fi name); the rest also works on Linux and Windows. Uses psutil.
ss.battery(), ss.cpu(), ss.ram_used(), ss.disk_free(), ss.local_ip()
ss.summary() # everything in one dict
ss.password("password > ") # ask for a password, each key shown as *
License
MIT
Metadata
Release files for simplesuit 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| simplesuit-0.2.1.tar.gz | 19.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simplesuit-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.7 kB
Release files / simplesuit-0.2.1.tar.gz
| Download URL | simplesuit-0.2.1.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
130e3f7e14bdcaf2c062f493d68f3a3d8a4d50fe33f143594fd9b142700dfd3d
|
|
BLAKE2b-256 checksum How to use checksums |
33fbd45c7ffd78887879471e09c1ccf291ff609c2ce0ca9dcc4c293a2a2028c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / simplesuit-0.2.1-py3-none-any.whl
| Download URL | simplesuit-0.2.1-py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4b70588f6341e43e27553df789a7073537e2f44d886779708e346ad472dd1e1
|
|
BLAKE2b-256 checksum How to use checksums |
4c0d4e621896c042479ef6dfb7eda9cd67298268e58552e8218536255131b7f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|