printly


Nameprintly JSON
Version 0.1.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-02-20 11:40:42
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 styled print terminal color colorama termcolor color print
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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`, and `hide`.
  - Supports combining multiple font styles (e.g., `"bold+italic"`)
- **Compatibility:**
  - Supports all standard `print()` parameters: `sep`, `end`, `file`, and `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") 
```
#### Example 2 (Override Built-in `print()`)
```python
from printly import print
print("Hello, world!", fg="red", bg="white", fs="bold")
```

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

#### Example
```python
from printly import style
styled_text = style("Hello, world!", fg="red", bg="white", fs="bold")
print(styled_text)
```

            

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": "styled print, terminal color, colorama, termcolor, color print",
    "author": null,
    "author_email": "\"Haripo Wesley T.\" <haripowesleyt@proton.me>",
    "download_url": "https://files.pythonhosted.org/packages/e6/ce/539633cd4f66c52ad4d6bb39447f3e28515dee8caea01290c26e6988f37f/printly-0.1.0.tar.gz",
    "platform": null,
    "description": "# Printly\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`, and `hide`.\n  - Supports combining multiple font styles (e.g., `\"bold+italic\"`)\n- **Compatibility:**\n  - Supports all standard `print()` parameters: `sep`, `end`, `file`, and `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#### Example 2 (Override Built-in `print()`)\n```python\nfrom printly import print\nprint(\"Hello, world!\", fg=\"red\", bg=\"white\", fs=\"bold\")\n```\n\n### 2. `style()` Function\nApply foreground color, background color, and font style to text.\n\n#### Example\n```python\nfrom printly import style\nstyled_text = style(\"Hello, world!\", fg=\"red\", bg=\"white\", fs=\"bold\")\nprint(styled_text)\n```\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.1.0",
    "project_urls": {
        "Homepage": "https://github.com/haripowesleyt/printly",
        "Issues": "https://github.com/haripowesleyt/printly/issues",
        "Repository": "https://github.com/haripowesleyt/printly"
    },
    "split_keywords": [
        "styled print",
        " terminal color",
        " colorama",
        " termcolor",
        " color print"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "784aca1b3201dcb2e12180f38e62c20c127324046f9850a5d686d31352aa320f",
                "md5": "4e358e2bbcc7d28552f108531d278d24",
                "sha256": "11134193d0e390625fa85b2d4b98a385b5a0b4a3ec5ebcc2745aa6583cb5d08f"
            },
            "downloads": -1,
            "filename": "printly-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4e358e2bbcc7d28552f108531d278d24",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 9201,
            "upload_time": "2025-02-20T11:40:41",
            "upload_time_iso_8601": "2025-02-20T11:40:41.197997Z",
            "url": "https://files.pythonhosted.org/packages/78/4a/ca1b3201dcb2e12180f38e62c20c127324046f9850a5d686d31352aa320f/printly-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e6ce539633cd4f66c52ad4d6bb39447f3e28515dee8caea01290c26e6988f37f",
                "md5": "8b7d4814da3fabd883a54cdf63ebbfa6",
                "sha256": "3656e421ec88309287d83ea4996d5d3f8f8112d91a237cac52bc2965fd346c1e"
            },
            "downloads": -1,
            "filename": "printly-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8b7d4814da3fabd883a54cdf63ebbfa6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8635,
            "upload_time": "2025-02-20T11:40:42",
            "upload_time_iso_8601": "2025-02-20T11:40:42.488180Z",
            "url": "https://files.pythonhosted.org/packages/e6/ce/539633cd4f66c52ad4d6bb39447f3e28515dee8caea01290c26e6988f37f/printly-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-20 11:40:42",
    "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.47032s