Skip to main content

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.

Downloads Month Badge Downloads Week Badge License Badge Supported Wheel Badge Supported Versions Badge Contributors

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

Pull requests are welcome

Change Log

0.0.1 (04/november/2023)

  • 0.0.1 Release

This is the first release!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rgbpy-0.0.1.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

rgbpy-0.0.1-py2.py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page