Printly is a Python library that enhances the built-in print function with direct text styling: foreground color, background color, and font styles.
Project description
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)
- 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")
- Supports 7 font styles:
- Compatibility:
- Supports all standard
print()parameters:sep,end,file,flush.
- Supports all standard
Installation
pip install printly
Usage
1. print() Function
An enhanced version of the built-in print() function.
Example 1 (Recommended)
import printly
printly.print("Hello, world!", fg="red", bg="white", fs="bold")
Example 2 (Override Built-in print())
from printly import print
print("I am a hacker!", fg="lime", bg="black", fs="bold+italic")
2. style() Function
Apply foreground color, background color, and font style to text.
Example
from printly import style
print(style("I love you! 💓", fg="deeppink", bg="hotpink", fs="bold"))
License
This project is licensed under the MIT License – see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file printly-0.5.0.tar.gz.
File metadata
- Download URL: printly-0.5.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eed9c75924c03c27b2d893ef41893bf2d12a54c2c8b61f4cb6b36494330e71a2
|
|
| MD5 |
05ac1ffce6bb032f87d3953d87bd6734
|
|
| BLAKE2b-256 |
4747403f9876880528eb36fbd175d09d358f5170160c700a151db349275a33a5
|
File details
Details for the file printly-0.5.0-py3-none-any.whl.
File metadata
- Download URL: printly-0.5.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9becdffab3cbcde606249f8f3628dcda7f78f8ecff109d4aec375430a9360979
|
|
| MD5 |
208d750e47a5ded83fcc5b77dfe8de0d
|
|
| BLAKE2b-256 |
556cc61d4405b9ea5f6b4e1101c7ae2895e7bb767dd8423b26993660dc62d460
|