Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/agn-7/colored-print

Python colored print plus storing it into a file.
https://github.com/agn-7/colored-print

color colors loggers logging output python terminal

Last synced: 3 months ago
JSON representation

Python colored print plus storing it into a file.

Awesome Lists containing this project

README

        

Colored Print
-----------------------
[![PyPI](https://img.shields.io/pypi/v/python-colored-print)](https://pypi.org/project/python-colored-print/)
[![Python Versions](https://img.shields.io/pypi/pyversions/python-colored-print)](https://pypi.org/project/python-colored-print/)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/agn-7/colored-print/master/LICENSE)

A lightweight python library in order to print in different colors and save them into a file optionally.

## Setup

```bash
pip install python-colored-print
```

## Usage

```python
from colored_print import log

log.success("Hello", 123, "Bye").store()
log.info("Hello", 123, "Bye")
log.warn("Hello", 123, "Bye")
log.err("Hello", 123, "Bye").store(path="log.txt")
log.pink("Hello", 123, "Bye")
log("Hello", 123, "Bye") # default color is white
log.store("Hello", 123, "Bye") # only store without printing
```

## Output

![Output](https://i.stack.imgur.com/HMVP6.png)