Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/agn-7/colored-print
- Owner: agn-7
- License: mit
- Created: 2021-05-08T05:46:09.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-12T09:58:57.000Z (10 months ago)
- Last Synced: 2024-04-12T16:58:43.679Z (10 months ago)
- Topics: color, colors, loggers, logging, output, python, terminal
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 loglog.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)