clprint


Nameclprint JSON
Version 0.0.10 PyPI version JSON
download
home_page
SummaryA package to print colored text in terminal
upload_time2022-12-25 18:20:03
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords color print terminal clprint colorprint color-print
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # clprint

A Python package that adds color to your print statements.

Colors ( 5 )
**`red -> print_r`** **`blue -> print_b`** **`green -> print_g`** **`yellow -> print_y`** **`purple -> print_p`**

## Installation 🚀

To install clprint, run the following command:

```bash
pip install clprint
```

## Usage ⚡️

Import the package in your Python script:

```bash
from clprint import * # imports everything
from clprint import print_g # print_g("Hello")
import clprint as cl # cl.print_r("Hello")
```

## Printing in different colors ✨

Use the following functions to print in different colors:

```bash
print_r("Hello") # to print in red
print_g("Hello")  # to print in green
print_b("Hello")  # to print in blue
print_y("Hello")  # to print in yellow
print_p("Hello") # to print in purple
```

## Adding a label ✨

To add a label to your print statement, pass the label argument to the print function:

```bash
print_r("Hello", label="My Label")
```

This will print the label in square brackets before the text:

```bash
[My Label] Hello
```

## Adding a highlight ✨

To highlight your print statement, add the letter h to the end of the function name

```bash
print_rh("Hello", label="My Label")
```

This will print the text with a background color, like this:

```bash
------------------------------------
[My Label]   : Hello
------------------------------------
```

## Example

Here is an example of how to use clPrint in your script:

```bash
import clprint

print_g("Hello, world!", label="Greeting")
print_b("This is a message in blue.", label="Info")
print_y("Warning: something went wrong.", label="Warning")
print_rh("This text is highlighted in red.", label="Error")
```

## Note

> clprint uses ANSI escape codes to change the color of the text in the terminal. This means that the colors may not show up correctly in IDEs or other environments that do not support ANSI escape codes.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "clprint",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "color,print,terminal,clprint,colorprint,color-print",
    "author": "",
    "author_email": "Latheesh V M <latheeshvmv@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e8/f9/8fc34ac21ed75225ef80cae10ac3b3bf17069d3e3d574f7738d52c8a7469/clprint-0.0.10.tar.gz",
    "platform": null,
    "description": "# clprint\n\nA Python package that adds color to your print statements.\n\nColors ( 5 )\n**`red -> print_r`** **`blue -> print_b`** **`green -> print_g`** **`yellow -> print_y`** **`purple -> print_p`**\n\n## Installation \ud83d\ude80\n\nTo install clprint, run the following command:\n\n```bash\npip install clprint\n```\n\n## Usage \u26a1\ufe0f\n\nImport the package in your Python script:\n\n```bash\nfrom clprint import * # imports everything\nfrom clprint import print_g # print_g(\"Hello\")\nimport clprint as cl # cl.print_r(\"Hello\")\n```\n\n## Printing in different colors \u2728\n\nUse the following functions to print in different colors:\n\n```bash\nprint_r(\"Hello\") # to print in red\nprint_g(\"Hello\")  # to print in green\nprint_b(\"Hello\")  # to print in blue\nprint_y(\"Hello\")  # to print in yellow\nprint_p(\"Hello\") # to print in purple\n```\n\n## Adding a label \u2728\n\nTo add a label to your print statement, pass the label argument to the print function:\n\n```bash\nprint_r(\"Hello\", label=\"My Label\")\n```\n\nThis will print the label in square brackets before the text:\n\n```bash\n[My Label] Hello\n```\n\n## Adding a highlight \u2728\n\nTo highlight your print statement, add the letter h to the end of the function name\n\n```bash\nprint_rh(\"Hello\", label=\"My Label\")\n```\n\nThis will print the text with a background color, like this:\n\n```bash\n------------------------------------\n[My Label]   : Hello\n------------------------------------\n```\n\n## Example\n\nHere is an example of how to use clPrint in your script:\n\n```bash\nimport clprint\n\nprint_g(\"Hello, world!\", label=\"Greeting\")\nprint_b(\"This is a message in blue.\", label=\"Info\")\nprint_y(\"Warning: something went wrong.\", label=\"Warning\")\nprint_rh(\"This text is highlighted in red.\", label=\"Error\")\n```\n\n## Note\n\n> clprint uses ANSI escape codes to change the color of the text in the terminal. This means that the colors may not show up correctly in IDEs or other environments that do not support ANSI escape codes.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A package to print colored text in terminal",
    "version": "0.0.10",
    "split_keywords": [
        "color",
        "print",
        "terminal",
        "clprint",
        "colorprint",
        "color-print"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "7fb3fc0797d5aa4dcc0e82111fdbb96f",
                "sha256": "f77aa39239d917d8152bbc0408e8636606d36efc77f8f6001a9d14c73a016e18"
            },
            "downloads": -1,
            "filename": "clprint-0.0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7fb3fc0797d5aa4dcc0e82111fdbb96f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 3949,
            "upload_time": "2022-12-25T18:20:01",
            "upload_time_iso_8601": "2022-12-25T18:20:01.679473Z",
            "url": "https://files.pythonhosted.org/packages/ad/22/e03d9ce0b75479b798654b7e0395dec5e989291474147d523e771219fbc9/clprint-0.0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "3f2d2cee03800213e4b3f13f81099d3c",
                "sha256": "635a73506b41072c7935bfa1107db6c35439898d2da9baa9a2f6941eae5b814c"
            },
            "downloads": -1,
            "filename": "clprint-0.0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "3f2d2cee03800213e4b3f13f81099d3c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 3509,
            "upload_time": "2022-12-25T18:20:03",
            "upload_time_iso_8601": "2022-12-25T18:20:03.495659Z",
            "url": "https://files.pythonhosted.org/packages/e8/f9/8fc34ac21ed75225ef80cae10ac3b3bf17069d3e3d574f7738d52c8a7469/clprint-0.0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-25 18:20:03",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "clprint"
}
        
Elapsed time: 0.02195s