Skip to main content

tranci: puts you in a trance.

Screenshot of Tranci's __main__.py output.

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?
  • tranci has 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, tranci isn't just colors and styles and oooo 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 to tranci with 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

Metadata

Release files for tranci 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tranci 1.3.0
File Size Uploaded Provenance Actions
tranci-1.3.0.tar.gz 10.2 kB With provenance Details for tranci-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tranci 1.3.0
File Interpreter ABI Platform Actions
tranci-1.3.0-py3-none-any.whl Python 3 none any Details for tranci-1.3.0-py3-none-any.whl

Total release size: 19.7 kB

Release files / tranci-1.3.0.tar.gz

Download URL tranci-1.3.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bc4363fdbb5b233bee714fb1d55a2447f7558c3d7b692febb801a0321f0890a1
BLAKE2b-256 checksum
How to use checksums
cfccc5628bb40bf9d07a54bb9e555e5966ccb89fa5eb82792a99240aa44e8d4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2025.

Transparency log

Release files / tranci-1.3.0-py3-none-any.whl

Download URL tranci-1.3.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7a4571ab919b2284ded67b793a02d2673d03579426e3265a953575c0f25a4ba
BLAKE2b-256 checksum
How to use checksums
f70bccda4443bf5a86f9fa0e572e4b064afbc5d6cc69f049661fa629ee14dc1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2025.

Transparency log

Security for tranci 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tranci-1.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page