printly


Nameprintly JSON
Version 0.5.0 PyPI version JSON
download
home_pageNone
SummaryPrintly is a Python library that enhances the built-in print function with direct text styling: foreground color, background color, and font styles.
upload_time2025-05-24 23:35:07
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT License Copyright (c) 2025 Haripo Wesley T. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords foreground color background color font style color print
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Printly
[![PyPI - Version](https://img.shields.io/pypi/v/printly)](https://pypi.org/project/printly/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/printly)](https://pypi.org/project/printly/)
[![License](https://img.shields.io/pypi/l/printly)](https://github.com/haripowesleyt/printly/blob/main/LICENSE)
[![Python Versions](https://img.shields.io/pypi/pyversions/printly)](https://pypi.org/project/printly/)

Printly is a Python library that enhances the built-in print function with direct text styling: foreground color (`fg`), background color (`bg`), and font styles (`fs`).

## Features
- **Colors:**
  - Supports over 140 color names ([from HTML](https://htmlcolorcodes.com/color-names/))
  - Supports all RGB values (e.g., `"128,0,128"`)
  - Supports all HEX color codes (e.g., `"#ff00ff"`)
- **Font Styles:**
  - Supports 7 font styles: `bold`, `italic`, `strikethrough`, `underline`, `overline`, `double-underline`, `hidden`.
  - Supports combining multiple font styles (e.g., `"bold+italic"`)
- **Compatibility:**
  - Supports all standard `print()` parameters: `sep`, `end`, `file`, `flush`.

## Installation
```bash
pip install printly
```

## Usage

### 1. `print()` Function
An enhanced version of the built-in `print()` function.

#### Example 1 (Recommended)
```python
import printly
printly.print("Hello, world!", fg="red", bg="white", fs="bold")
```
![usage-print-recommended](https://raw.githubusercontent.com/haripowesleyt/printly/main/assets/images/usage-print-recommended.png)

#### Example 2 (Override Built-in `print()`)
```python
from printly import print
print("I am a hacker!", fg="lime", bg="black", fs="bold+italic")
```
![usage-print-override](https://raw.githubusercontent.com/haripowesleyt/printly/main/assets/images/usage-print-override.png)

### 2. `style()` Function
Apply foreground color, background color, and font style to text.

#### Example
```python
from printly import style
print(style("I love you! 💓", fg="deeppink", bg="hotpink", fs="bold"))
```
![usage-style](https://raw.githubusercontent.com/haripowesleyt/printly/main/assets/images/usage-style.png)

## License
This project is licensed under the **MIT License** – see the [LICENSE](https://raw.githubusercontent.com/haripowesleyt/printly/main/LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "printly",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "\"Haripo Wesley T.\" <haripowesleyt@proton.me>",
    "keywords": "foreground color, background color, font style, color print",
    "author": null,
    "author_email": "\"Haripo Wesley T.\" <haripowesleyt@proton.me>",
    "download_url": "https://files.pythonhosted.org/packages/47/47/403f9876880528eb36fbd175d09d358f5170160c700a151db349275a33a5/printly-0.5.0.tar.gz",
    "platform": null,
    "description": "# Printly\n[![PyPI - Version](https://img.shields.io/pypi/v/printly)](https://pypi.org/project/printly/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/printly)](https://pypi.org/project/printly/)\n[![License](https://img.shields.io/pypi/l/printly)](https://github.com/haripowesleyt/printly/blob/main/LICENSE)\n[![Python Versions](https://img.shields.io/pypi/pyversions/printly)](https://pypi.org/project/printly/)\n\nPrintly is a Python library that enhances the built-in print function with direct text styling: foreground color (`fg`), background color (`bg`), and font styles (`fs`).\n\n## Features\n- **Colors:**\n  - Supports over 140 color names ([from HTML](https://htmlcolorcodes.com/color-names/))\n  - Supports all RGB values (e.g., `\"128,0,128\"`)\n  - Supports all HEX color codes (e.g., `\"#ff00ff\"`)\n- **Font Styles:**\n  - Supports 7 font styles: `bold`, `italic`, `strikethrough`, `underline`, `overline`, `double-underline`, `hidden`.\n  - Supports combining multiple font styles (e.g., `\"bold+italic\"`)\n- **Compatibility:**\n  - Supports all standard `print()` parameters: `sep`, `end`, `file`, `flush`.\n\n## Installation\n```bash\npip install printly\n```\n\n## Usage\n\n### 1. `print()` Function\nAn enhanced version of the built-in `print()` function.\n\n#### Example 1 (Recommended)\n```python\nimport printly\nprintly.print(\"Hello, world!\", fg=\"red\", bg=\"white\", fs=\"bold\")\n```\n![usage-print-recommended](https://raw.githubusercontent.com/haripowesleyt/printly/main/assets/images/usage-print-recommended.png)\n\n#### Example 2 (Override Built-in `print()`)\n```python\nfrom printly import print\nprint(\"I am a hacker!\", fg=\"lime\", bg=\"black\", fs=\"bold+italic\")\n```\n![usage-print-override](https://raw.githubusercontent.com/haripowesleyt/printly/main/assets/images/usage-print-override.png)\n\n### 2. `style()` Function\nApply foreground color, background color, and font style to text.\n\n#### Example\n```python\nfrom printly import style\nprint(style(\"I love you! \ud83d\udc93\", fg=\"deeppink\", bg=\"hotpink\", fs=\"bold\"))\n```\n![usage-style](https://raw.githubusercontent.com/haripowesleyt/printly/main/assets/images/usage-style.png)\n\n## License\nThis project is licensed under the **MIT License** \u2013 see the [LICENSE](https://raw.githubusercontent.com/haripowesleyt/printly/main/LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Haripo Wesley T.\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        ",
    "summary": "Printly is a Python library that enhances the built-in print function with direct text styling: foreground color, background color, and font styles.",
    "version": "0.5.0",
    "project_urls": {
        "Homepage": "https://github.com/haripowesleyt/printly",
        "Issues": "https://github.com/haripowesleyt/printly/issues",
        "Repository": "https://github.com/haripowesleyt/printly"
    },
    "split_keywords": [
        "foreground color",
        " background color",
        " font style",
        " color print"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "556cc61d4405b9ea5f6b4e1101c7ae2895e7bb767dd8423b26993660dc62d460",
                "md5": "208d750e47a5ded83fcc5b77dfe8de0d",
                "sha256": "9becdffab3cbcde606249f8f3628dcda7f78f8ecff109d4aec375430a9360979"
            },
            "downloads": -1,
            "filename": "printly-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "208d750e47a5ded83fcc5b77dfe8de0d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10290,
            "upload_time": "2025-05-24T23:35:05",
            "upload_time_iso_8601": "2025-05-24T23:35:05.258296Z",
            "url": "https://files.pythonhosted.org/packages/55/6c/c61d4405b9ea5f6b4e1101c7ae2895e7bb767dd8423b26993660dc62d460/printly-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4747403f9876880528eb36fbd175d09d358f5170160c700a151db349275a33a5",
                "md5": "05ac1ffce6bb032f87d3953d87bd6734",
                "sha256": "eed9c75924c03c27b2d893ef41893bf2d12a54c2c8b61f4cb6b36494330e71a2"
            },
            "downloads": -1,
            "filename": "printly-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "05ac1ffce6bb032f87d3953d87bd6734",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 9808,
            "upload_time": "2025-05-24T23:35:07",
            "upload_time_iso_8601": "2025-05-24T23:35:07.253175Z",
            "url": "https://files.pythonhosted.org/packages/47/47/403f9876880528eb36fbd175d09d358f5170160c700a151db349275a33a5/printly-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-05-24 23:35:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "haripowesleyt",
    "github_project": "printly",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "printly"
}
        
Elapsed time: 0.74647s