Tranci: a no-dependencies, lightweight, easy-to-use ANSI library
Project description
tranci: puts you in a trance.
What in the world is a "tranci"?
tranci is a no-dependencies, lightweight, easy-to-use, Pythonic ANSI library. It officially supports Python 3.9-3.13. You can move the cursor around, do some colors. Idk, just general ANSI.
How do I use this?
Install the tranci package with pip. Run python -m tranci to confirm it works.
Example code:
import tranci
print(tranci.Red("Red text"))
print(tranci.BGRed("Red background"))
print(tranci.RGB(164, 106, 120, "RGB code"))
print(tranci.HEX("#A44A44", "HEX code"))
weird_cyan_green_color_thing = tranci.HEX(0x3affad)
print(weird_cyan_green_color_thing("You can save them too"))
You can figure out everything else just by looking at your IDE's autocomplete! (or just look at the cool tranci/__main__.py source code)
Why would I use this over anything else
- Auto reset handling
- Actual nesting functionality
- IDE auto-complete won't cry seeing the code
- True color
- Zero dependencies
Ok but [that one clone of a JS library that shall not be named] exists
- It's a clone of a JS library. What do you think?
trancihas everything[that one clone of a JS library that shall not be named]has except fallbacks.- You don't need fallbacks/capabilities-detection. It just adds bloat.
- Even if the JS clone is slightly lighter,
tranciisn't just colors and styles andoooo look at this bold italic striked underlined red text!!!. It also supports a bit more general ANSI, in a more Pythonic extendable syntax. You can add your own ANSI things totranciwith the class system. Plus the world won't end if your project is 51.82KiB larger than it could be.
Download tranci now! or something uhh what do those mobile game ads say at the end again
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tranci-1.2.0.tar.gz.
File metadata
- Download URL: tranci-1.2.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f535af4cbdc971ba41313c419aae9f9e6fa3fefe482dfb58a31a8327fb6f94ad
|
|
| MD5 |
e70962e8f011ae04ed9df270ba1829ab
|
|
| BLAKE2b-256 |
45d573d93e0e36465cdc5d096d4b1c7b0f91c50f0b81e85af3c11008be72384c
|
Provenance
The following attestation bundles were made for tranci-1.2.0.tar.gz:
Publisher:
python-publish.yml on Butterroach/tranci
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tranci-1.2.0.tar.gz -
Subject digest:
f535af4cbdc971ba41313c419aae9f9e6fa3fefe482dfb58a31a8327fb6f94ad - Sigstore transparency entry: 314303919
- Sigstore integration time:
-
Permalink:
Butterroach/tranci@8ab1fddfeff5beb29e7476aaf90c54d55b46f74e -
Branch / Tag:
refs/tags/1.2.0 - Owner: https://github.com/Butterroach
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8ab1fddfeff5beb29e7476aaf90c54d55b46f74e -
Trigger Event:
release
-
Statement type:
File details
Details for the file tranci-1.2.0-py3-none-any.whl.
File metadata
- Download URL: tranci-1.2.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
312ea7e22f6907a7ba703c57755cb29c198a400d0d4f46caba292c9d25aaf226
|
|
| MD5 |
bc1ca1b37765fca0620842ea3bd41451
|
|
| BLAKE2b-256 |
2ce9952f1a09b55a2addb8dbdec9435712c8541792930ff3867cda563c040b29
|
Provenance
The following attestation bundles were made for tranci-1.2.0-py3-none-any.whl:
Publisher:
python-publish.yml on Butterroach/tranci
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tranci-1.2.0-py3-none-any.whl -
Subject digest:
312ea7e22f6907a7ba703c57755cb29c198a400d0d4f46caba292c9d25aaf226 - Sigstore transparency entry: 314303923
- Sigstore integration time:
-
Permalink:
Butterroach/tranci@8ab1fddfeff5beb29e7476aaf90c54d55b46f74e -
Branch / Tag:
refs/tags/1.2.0 - Owner: https://github.com/Butterroach
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8ab1fddfeff5beb29e7476aaf90c54d55b46f74e -
Trigger Event:
release
-
Statement type: