Metadata-Version: 2.4
Name: color-print-abi6374
Version: 0.3.0
Summary: Simple colored terminal output for Python
Author-email: Your Name <your.email@example.com>
License: MIT License
        
        Copyright (c) 2025 G S ABINIVAS
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/abi6374/color-print
Project-URL: Repository, https://github.com/abi6374/color-print.git
Project-URL: Issues, https://github.com/abi6374/color-print/issues
Keywords: color,terminal,output,console
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Dynamic: license-file

# color-print

Tiny Python package to format and print colored text using ANSI escape sequences.

Usage

```python
from color_print import color_print, format_text

color_print("Hello", "green")
# or
s = format_text("Hello", "red")
print(s)
```

Install

```bash
# install from source
pip install .

# or install the published package from PyPI (unique name chosen to avoid conflicts):
pip install color-print-abi6374
```

Run tests

```bash
pip install -e .[test]
pytest
```


CI & Publishing
-----------------

This repository includes GitHub Actions workflows to run tests and publish releases.

- CI: `.github/workflows/ci.yml` — runs tests on push and PRs to `main` across multiple Python versions and OSes.
- Publish (tag-based): `.github/workflows/publish.yml` — builds and uploads to PyPI when you push a tag matching `v*.*.*`.
- Release-based: `.github/workflows/release-publish.yml` — builds on GitHub Release published and uploads to PyPI.

Before publishing to PyPI

1. Create a PyPI API token on https://pypi.org/manage/account/#api-tokens. Copy the token immediately.
2. In GitHub, go to your repository → Settings → Secrets and variables → Actions → New repository secret.
	- Name: `PYPI_API_TOKEN`
	- Value: paste the token from PyPI

Publish using a tag (from PowerShell)

```powershell
# create annotated tag at current main HEAD
git checkout main
git pull origin main
git tag -a v0.1.0 -m "release v0.1.0"
git push origin v0.1.0
```

Or publish by creating a GitHub Release (UI): create a release for the version and publish it — the `release-publish.yml` workflow will run.

If a workflow fails to resolve a third-party action (for example `pypa/gh-action-pypi-publish@...`), the repository includes fallbacks that run `twine` directly on the runner. Ensure `PYPI_API_TOKEN` is set and the tag/release points at the commit that contains the updated workflow file.
