Ansy
ansy (pronounced ANSI), inspired by termcolor, is a lightweight python library used to style and format output in the terminal.
✨ Features
- Easy text coloring and styling using intuitive functions
- Support for 4-bit, 8-bit, and 24-bit (truecolor) color modes
- Gradients, palettes, and random color generation
- Cross-platform support (Windows, Linux, macOS)
📦 Installation
Ansy is available on PyPI and can be installed with pip.
pip install ansy
or Install from source:
git clone https://github.com/anas-shakeel/ansy.git
cd ansy
pip install .
You may also need to install colorama (Windows users only).
🚀 Quick Usage
from ansy import colored
print(colored("Hello, World!", fgcolor="cyan", bgcolor="black", attrs=["bold"]))
OR
from ansy import colored_gradient
print(colored_gradient(text, "#00ffff", "#b00b1e"))
📚 Documentation
Full documentation is available here
🤝 Contributing
Contributions are welcome! Check out the contributing guide to get started.
💻 Compatibility
This package has been well-tested across three major platforms (Windows, MacOS, and Linux/ubuntu).
It supports Python versions 3.8 upto 3.13. it may or may not work on other versions. See more
Preview
Made with ❤️ to make your terminal output more beautiful.
Metadata
Release files for ansy 1.1.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 |
|---|---|---|---|---|
| ansy-1.1.3.tar.gz | 32.2 kB | Without provenance | Details for ansy-1.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ansy-1.1.3-py3-none-any.whl | Python 3 | none | any | Details for ansy-1.1.3-py3-none-any.whl |
Total release size: 63.5 kB
Release files / ansy-1.1.3.tar.gz
| Download URL | ansy-1.1.3.tar.gz |
|---|---|
| Size | 32.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb11be3db7ebefe41e5e0e4c3ce04a35e65a5514b42cbae0559ea7912b08f649
|
|
BLAKE2b-256 checksum How to use checksums |
078f5fed9f5e33e437257457c526f091b8202e198d52c4fde68acf4532e5b6bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / ansy-1.1.3-py3-none-any.whl
| Download URL | ansy-1.1.3-py3-none-any.whl |
|---|---|
| Size | 31.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b6155ec588fe0d0071a7a6e12396710a3e2facd87008b6e7305d93d63ed1c284
|
|
BLAKE2b-256 checksum How to use checksums |
0e903e3242e3ce851b85b050fa1c6043afeeb8b6b7b2c4c43cb72bd30fa4f204
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for ansy 1.1.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.