# Ansy
[](https://github.com/anas-shakeel/ansy)
[](https://pypi.python.org/pypi/ansy)
[](https://pypi.python.org/pypi/ansy)
[](LICENSE)
[](black)
[](https://github.com/anas-shakeel/ansy/actions/workflows/test.yml?query=branch%3Amain)
[](https://pypi.org/project/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`.
```shell
pip install ansy
```
or Install from source:
```shell
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
```python
from ansy import colored
print(colored("Hello, World!", fgcolor="cyan", bgcolor="black", attrs=["bold"]))
```
OR
```python
from ansy import colored_gradient
print(colored_gradient(text, "#00ffff", "#b00b1e"))
```
### 📚 Documentation
Full documentation is available [here](https://anas-shakeel.github.io/ansy/)
### 🤝 Contributing
Contributions are welcome! Check out the [contributing guide](https://anas-shakeel.github.io/ansy/contributing/) 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](https://anas-shakeel.github.io/ansy/compatibility/)
## Preview

Made with ❤️ to make your terminal output more beautiful.
Raw data
{
"_id": null,
"home_page": null,
"name": "ansy",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "python, ANSI, ANSI color, color, cli, command-line, terminal, text formatting, color output, ansy, terminal, text styling",
"author": null,
"author_email": "Anas Shakeel <srdranas456@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/07/8f/5fed9f5e33e437257457c526f091b8202e198d52c4fde68acf4532e5b6bb/ansy-1.1.3.tar.gz",
"platform": null,
"description": "# Ansy\n\n[](https://github.com/anas-shakeel/ansy)\n[](https://pypi.python.org/pypi/ansy)\n[](https://pypi.python.org/pypi/ansy)\n[](LICENSE)\n[](black)\n[](https://github.com/anas-shakeel/ansy/actions/workflows/test.yml?query=branch%3Amain)\n[](https://pypi.org/project/ansy/)\n\n`ansy` (_pronounced ANSI_), inspired by `termcolor`, is a _lightweight python library_ used to style and format output in the terminal.\n\n## \u2728 Features\n\n- Easy text coloring and styling using intuitive functions\n- Support for **4-bit**, **8-bit**, and **24-bit** (truecolor) color modes\n- **Gradients**, **palettes**, and **random color** generation\n- Cross-platform support _(Windows, Linux, macOS)_\n\n### \ud83d\udce6 Installation\n\nAnsy is available on **PyPI** and can be installed with `pip`.\n\n```shell\npip install ansy\n```\n\nor Install from source:\n\n```shell\ngit clone https://github.com/anas-shakeel/ansy.git\ncd ansy\npip install .\n```\n\nYou may also need to install `colorama` (_**Windows** users only_).\n\n### \ud83d\ude80 Quick Usage\n\n```python\nfrom ansy import colored\n\nprint(colored(\"Hello, World!\", fgcolor=\"cyan\", bgcolor=\"black\", attrs=[\"bold\"]))\n```\n\nOR \n\n```python\nfrom ansy import colored_gradient\n\nprint(colored_gradient(text, \"#00ffff\", \"#b00b1e\"))\n```\n\n### \ud83d\udcda Documentation\n\nFull documentation is available [here](https://anas-shakeel.github.io/ansy/)\n\n### \ud83e\udd1d Contributing\n\nContributions are welcome! Check out the [contributing guide](https://anas-shakeel.github.io/ansy/contributing/) to get started.\n\n### \ud83d\udcbb Compatibility\n\nThis package has been well-tested across three major platforms (**Windows**, **MacOS**, and **Linux/ubuntu**).\n\nIt supports Python versions `3.8` upto `3.13`. it may or may not work on other versions. [See more](https://anas-shakeel.github.io/ansy/compatibility/)\n\n## Preview\n\n\n\nMade with \u2764\ufe0f to make your terminal output more beautiful.\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python package to colorize and format output in the terminal.",
"version": "1.1.3",
"project_urls": {
"Documentation": "https://anas-shakeel.github.io/ansy/",
"Homepage": "https://github.com/anas-shakeel/ansy",
"Source": "https://github.com/anas-shakeel/ansy"
},
"split_keywords": [
"python",
" ansi",
" ansi color",
" color",
" cli",
" command-line",
" terminal",
" text formatting",
" color output",
" ansy",
" terminal",
" text styling"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "0e903e3242e3ce851b85b050fa1c6043afeeb8b6b7b2c4c43cb72bd30fa4f204",
"md5": "6e3a19553bd99b6cd0fb0cf74d6f9c74",
"sha256": "b6155ec588fe0d0071a7a6e12396710a3e2facd87008b6e7305d93d63ed1c284"
},
"downloads": -1,
"filename": "ansy-1.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6e3a19553bd99b6cd0fb0cf74d6f9c74",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 31340,
"upload_time": "2025-07-30T23:02:54",
"upload_time_iso_8601": "2025-07-30T23:02:54.376040Z",
"url": "https://files.pythonhosted.org/packages/0e/90/3e3242e3ce851b85b050fa1c6043afeeb8b6b7b2c4c43cb72bd30fa4f204/ansy-1.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "078f5fed9f5e33e437257457c526f091b8202e198d52c4fde68acf4532e5b6bb",
"md5": "8e3ab1bd388417a6d2848c75e2a62495",
"sha256": "fb11be3db7ebefe41e5e0e4c3ce04a35e65a5514b42cbae0559ea7912b08f649"
},
"downloads": -1,
"filename": "ansy-1.1.3.tar.gz",
"has_sig": false,
"md5_digest": "8e3ab1bd388417a6d2848c75e2a62495",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 32196,
"upload_time": "2025-07-30T23:02:57",
"upload_time_iso_8601": "2025-07-30T23:02:57.100014Z",
"url": "https://files.pythonhosted.org/packages/07/8f/5fed9f5e33e437257457c526f091b8202e198d52c4fde68acf4532e5b6bb/ansy-1.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-30 23:02:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "anas-shakeel",
"github_project": "ansy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ansy"
}