A Python package to colorize and format output in the terminal.
Project description
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.
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 ansy-1.1.3.tar.gz.
File metadata
- Download URL: ansy-1.1.3.tar.gz
- Upload date:
- Size: 32.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb11be3db7ebefe41e5e0e4c3ce04a35e65a5514b42cbae0559ea7912b08f649
|
|
| MD5 |
8e3ab1bd388417a6d2848c75e2a62495
|
|
| BLAKE2b-256 |
078f5fed9f5e33e437257457c526f091b8202e198d52c4fde68acf4532e5b6bb
|
File details
Details for the file ansy-1.1.3-py3-none-any.whl.
File metadata
- Download URL: ansy-1.1.3-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6155ec588fe0d0071a7a6e12396710a3e2facd87008b6e7305d93d63ed1c284
|
|
| MD5 |
6e3a19553bd99b6cd0fb0cf74d6f9c74
|
|
| BLAKE2b-256 |
0e903e3242e3ce851b85b050fa1c6043afeeb8b6b7b2c4c43cb72bd30fa4f204
|