RGBpy it is python text-style ✅ not python textile! 🤔 it actually print your text on terminal in different kind of colors, including logging.
Project description
RGBpy
RGBpy it is python text-style ✅ not python textile! 🤔 it actually print your text on terminal in different kind of colors, including logging.
Simple use of rgbpy
First we recommend creating a virtual environment python -m venv venv
and then activate it source venv/bin/activate
Once that finish now install the library using
pip install rgbpy
Wait for the installation to finish, basically the library was uploaded using sdist
(Source Distribution) and bdist_wheel
(Built Distribution).
To print text with color using python print, instead of using print
function, use any of the following functions (purple, blue, cyan, green, yellow, red, normal, bold, underline, log_style)
>>> from rgbpy import (purple, blue, cyan, green, yellow, red, normal, bold, underline)
>>> purple('I am purple in color')
>>> blue('I am blue in color')
>>> cyan('I am cyan in color')
>>> green('I am green in color')
>>> yellow('I am yellow in color')
>>> red('I am red in color')
>>> normal('I am a normal text')
>>> bold('I make text bold')
>>> underline('I underline text')
To print logging text with color:
>>> import logging
>>> from rgbpy import log_style
>>> FORMATTER = '[+] [%(asctime)s] [%(levelname)s] %(message)s'
>>> logging.basicConfig(format=FORMATTER)
>>> LOGGER = logging.getLogger(__name__)
>>> LOGGER.setLevel(logging.DEBUG)
>>> log_style('I am info logger')
>>> log_style('I am yellow logger', col='yellow')
>>> log_style('I am error logger', log='error')
See more documentations here!
Useful links
- Documentation: https://rgbpy.readthedocs.io
- Repository: https://github.com/usmanmusa1920/rgbpy
- PYPI Release: https://pypi.org/project/rgbpy
Pull requests are welcome
Change Log
0.0.1 (04/november/2023)
- 0.0.1 Release
This is the first release!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rgbpy-0.0.1.tar.gz
.
File metadata
- Download URL: rgbpy-0.0.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 277a842b2f9441fe987db2bdde98c1527ef4ad5c6e38026d3d5798174b3ea24c |
|
MD5 | 7bd2fe40147fdd5552731fc8296d6868 |
|
BLAKE2b-256 | 91a32096bef2173361884d5bce14d481fb0a9064672a6c028d8f62dd58c48fed |
File details
Details for the file rgbpy-0.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: rgbpy-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92d3fdebc3ebdf6a703546a118d14660adb59f85c2246f3fd5f4d035053bb449 |
|
MD5 | d5a7d8709d1fc6230a27acdccde9460e |
|
BLAKE2b-256 | 7fcbe14dc0ea5060e4d1ebc163043201e86b6bb1d5f2d17fbbb6706d790cb4c1 |