ansy


Nameansy JSON
Version 1.1.3 PyPI version JSON
download
home_pageNone
SummaryA Python package to colorize and format output in the terminal.
upload_time2025-07-30 23:02:57
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords python ansi ansi color color cli command-line terminal text formatting color output ansy terminal text styling
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Ansy

[![GitHub Repository](https://img.shields.io/badge/-GitHub-%230D0D0D?logo=github&labelColor=gray)](https://github.com/anas-shakeel/ansy)
[![Latest PyPi version](https://img.shields.io/pypi/v/ansy.svg)](https://pypi.python.org/pypi/ansy)
[![supported Python versions](https://img.shields.io/pypi/pyversions/ansy)](https://pypi.python.org/pypi/ansy)
[![Project licence](https://img.shields.io/pypi/l/ansy?color=blue)](LICENSE)
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](black)
[![Automated testing results](https://img.shields.io/github/actions/workflow/status/anas-shakeel/ansy/.github/workflows/test.yml?branch=main)](https://github.com/anas-shakeel/ansy/actions/workflows/test.yml?query=branch%3Amain)
[![PyPI downloads](https://static.pepy.tech/badge/ansy)](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

![A preview of Ansy in action](https://raw.githubusercontent.com/Anas-Shakeel/ansy/refs/heads/main/docs/images/demo.gif)

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[![GitHub Repository](https://img.shields.io/badge/-GitHub-%230D0D0D?logo=github&labelColor=gray)](https://github.com/anas-shakeel/ansy)\n[![Latest PyPi version](https://img.shields.io/pypi/v/ansy.svg)](https://pypi.python.org/pypi/ansy)\n[![supported Python versions](https://img.shields.io/pypi/pyversions/ansy)](https://pypi.python.org/pypi/ansy)\n[![Project licence](https://img.shields.io/pypi/l/ansy?color=blue)](LICENSE)\n[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](black)\n[![Automated testing results](https://img.shields.io/github/actions/workflow/status/anas-shakeel/ansy/.github/workflows/test.yml?branch=main)](https://github.com/anas-shakeel/ansy/actions/workflows/test.yml?query=branch%3Amain)\n[![PyPI downloads](https://static.pepy.tech/badge/ansy)](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![A preview of Ansy in action](https://raw.githubusercontent.com/Anas-Shakeel/ansy/refs/heads/main/docs/images/demo.gif)\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"
}
        
Elapsed time: 2.54350s