AnsiColorsLib
This is a library that is designed to allow developers to easily print colorized text.
Installation
To install simply use pip:
pip install AnsiColorsLib
Usage
from ansicolorslib import COLOR_MANAGER
# Print entire text with a modification.
COLOR_MANAGER.ansiprint("Hello, World!", COLOR_MANAGER.RED + COLOR_MANAGER.BOLD, begins_with="\t\t", ends_with="\n\n")
# Modify a specific part of a string.
START_INDEX = 3
STOP_INDEX = 9
MOD = COLOR_MANAGER.GREEN + COLOR_MANAGER.BOLD
param1 = (START_INDEX, STOP_INDEX, MOD)
modded = COLOR_MANAGER.modify_string("Hello, World!", [param1])
print(modded)
# Get ansi string of rgb value.
R = 123
G = 221
B = 111
my_ansi = COLOR_MANAGER.ansirgb(R, G, B)
COLOR_MANAGER.ansiprint("Hello, World!", my_ansi)
Metadata
Release files for AnsiColorsLib 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| AnsiColorsLib-1.0.3.tar.gz | 5.5 kB | Without provenance | Details for AnsiColorsLib-1.0.3.tar.gz |
Release files / AnsiColorsLib-1.0.3.tar.gz
| Download URL | AnsiColorsLib-1.0.3.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
968a8c599ef6d635ff2879dd578b8f099854f01b18f8dc9acb6fee2964f24a87
|
|
BLAKE2b-256 checksum How to use checksums |
f3d4652ef51147e966ffe043babea729c7897d440f978efe0d823e117ba8fdab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0
|
Security for AnsiColorsLib 1.0.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.