Skip to content

Anas-Shakeel/ansy

Repository files navigation

Ansy

GitHub Repository Latest PyPi version supported Python versions Project licence Black Automated testing results PyPI downloads

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

A preview of Ansy in action

Made with ❤️ to make your terminal output more beautiful.

About

A Python package to colorize and format output in the terminal.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages