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!
Release files for rgbpy 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rgbpy-0.0.1.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rgbpy-0.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 13.5 kB
Release files / rgbpy-0.0.1.tar.gz
| Download URL | rgbpy-0.0.1.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
277a842b2f9441fe987db2bdde98c1527ef4ad5c6e38026d3d5798174b3ea24c
|
|
BLAKE2b-256 checksum How to use checksums |
91a32096bef2173361884d5bce14d481fb0a9064672a6c028d8f62dd58c48fed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / rgbpy-0.0.1-py2.py3-none-any.whl
| Download URL | rgbpy-0.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
92d3fdebc3ebdf6a703546a118d14660adb59f85c2246f3fd5f4d035053bb449
|
|
BLAKE2b-256 checksum How to use checksums |
7fcbe14dc0ea5060e4d1ebc163043201e86b6bb1d5f2d17fbbb6706d790cb4c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|