colorful-logging


Namecolorful-logging JSON
Version 0.8 PyPI version JSON
download
home_pagehttps://github.com/zamoosh/colorful_logging
SummaryA library to print colorful
upload_time2024-04-28 07:43:40
maintainerNone
docs_urlNone
authorzamoosh
requires_pythonNone
licenseMIT
keywords colorful logging color printing color output
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # This is just a simple library to print colorful using sys.stderr to write.

```python
from colorful_logging.colorful_logging import color_print

# color_print(
# text: str = your text
# color: str = 'red', 'blue', ...
# fmt: bool = True or False
# lvl: str -> it's just a simple naming when using the "fmt=True"
# )


# for example:
color_print(
    text='ali is good',
    color='cyan',
    fmt=True,
    lvl='ALI LEVEL'
)
# will produce (with colored text): 
# ALI LEVEL    24-02-06 18:49:15, File "where the color print executed", Line 1, in "the module", msg: ali is good


# here also you can use it without formatting the line: 
color_print('ali is good', 'bold')
```

## To get specific color:

```python
from colorful_logging.colorful_logging import get_color

c = get_color("dark blue")
r = get_color("reset")

text = f"hello {c}Ali{r}"
print(text)
```

## You can also colorize you object:

```python
from colorful_logging.colorful_logging import colorize

p = Person(name="ali", age=18)

colorized_elem = colorize("pink", p)

print(f"hello {colorized_elem}")
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zamoosh/colorful_logging",
    "name": "colorful-logging",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "colorful logging, color printing, color output",
    "author": "zamoosh",
    "author_email": "moyi.pary@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ff/bb/788aa8dca75584a75eb3731e9623f95dd3c0365b087af02f0abe45f4148e/colorful_logging-0.8.tar.gz",
    "platform": null,
    "description": "# This is just a simple library to print colorful using sys.stderr to write.\n\n```python\nfrom colorful_logging.colorful_logging import color_print\n\n# color_print(\n# text: str = your text\n# color: str = 'red', 'blue', ...\n# fmt: bool = True or False\n# lvl: str -> it's just a simple naming when using the \"fmt=True\"\n# )\n\n\n# for example:\ncolor_print(\n    text='ali is good',\n    color='cyan',\n    fmt=True,\n    lvl='ALI LEVEL'\n)\n# will produce (with colored text): \n# ALI LEVEL    24-02-06 18:49:15, File \"where the color print executed\", Line 1, in \"the module\", msg: ali is good\n\n\n# here also you can use it without formatting the line: \ncolor_print('ali is good', 'bold')\n```\n\n## To get specific color:\n\n```python\nfrom colorful_logging.colorful_logging import get_color\n\nc = get_color(\"dark blue\")\nr = get_color(\"reset\")\n\ntext = f\"hello {c}Ali{r}\"\nprint(text)\n```\n\n## You can also colorize you object:\n\n```python\nfrom colorful_logging.colorful_logging import colorize\n\np = Person(name=\"ali\", age=18)\n\ncolorized_elem = colorize(\"pink\", p)\n\nprint(f\"hello {colorized_elem}\")\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A library to print colorful",
    "version": "0.8",
    "project_urls": {
        "Homepage": "https://github.com/zamoosh/colorful_logging"
    },
    "split_keywords": [
        "colorful logging",
        " color printing",
        " color output"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d0da2f30cc32618ce29a206617630d95ac7759ae7ca9f7d0d06e8fc36445e712",
                "md5": "379cb3f9a45dac718e2ac2b87f20ad76",
                "sha256": "029313395e0d8469ca636541b48510f10847f0496605aaa64cf95a8ff84ce55d"
            },
            "downloads": -1,
            "filename": "colorful_logging-0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "379cb3f9a45dac718e2ac2b87f20ad76",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3987,
            "upload_time": "2024-04-28T07:43:28",
            "upload_time_iso_8601": "2024-04-28T07:43:28.508425Z",
            "url": "https://files.pythonhosted.org/packages/d0/da/2f30cc32618ce29a206617630d95ac7759ae7ca9f7d0d06e8fc36445e712/colorful_logging-0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ffbb788aa8dca75584a75eb3731e9623f95dd3c0365b087af02f0abe45f4148e",
                "md5": "fa956015b34dade1746b0b8781ad71b6",
                "sha256": "041df1c7a45d4cbf9a06b59be99aa565eb2eb3064a8bf545cbe53b8c188bb27c"
            },
            "downloads": -1,
            "filename": "colorful_logging-0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "fa956015b34dade1746b0b8781ad71b6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3683,
            "upload_time": "2024-04-28T07:43:40",
            "upload_time_iso_8601": "2024-04-28T07:43:40.455625Z",
            "url": "https://files.pythonhosted.org/packages/ff/bb/788aa8dca75584a75eb3731e9623f95dd3c0365b087af02f0abe45f4148e/colorful_logging-0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-28 07:43:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zamoosh",
    "github_project": "colorful_logging",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "colorful-logging"
}
        
Elapsed time: 0.21114s