A simple and colorful text printing library for Python
Project description
Printfxpy
A simple, lightweight, and colorful text printing library for Python. Supports colors, styles, HTML hex colors, and even gradient text.
Support
Join our Discord server for support, questions, and community discussions:
Features
- 🎨 Support for 16 different colors
- 🔤 Support for 8 different font styles (Bold, Italic, Underline, etc.)
- 🌈 2-color gradient printing using HTML hex colors (#RRGGBB)
- 🔧 Runtime color & style overrides
- 📦 Zero dependencies
- 🐍 Python 3.8+ support
Installation
pip install printfxpy
Quick Start
from printfx import PrintFX
# Basic color printing
printer = PrintFX("RED")
printer.printfx("Hello World!")
# With font styles
bold = PrintFX("GREEN", "BOLD")
bold.printfx("Bold text")
# Runtime style changes
printer.printfx("Italic text", font_style="ITALIC")
printer.printfx("Underlined text", font_style="UNDERLINE")
Available Colors
BLACK,RED,GREEN,YELLOW,BLUE,MAGENTA,CYAN,WHITEBRIGHT_BLACK,BRIGHT_RED,BRIGHT_GREEN,BRIGHT_YELLOW,BRIGHT_BLUE,BRIGHT_MAGENTA,BRIGHT_CYAN,BRIGHT_WHITE
Available Font Styles
NORMAL- Default text styleBOLD- Bold textDIM- Dimmed textITALIC- Italic textUNDERLINE- Underlined textBLINK- Blinking textREVERSE- Reversed colorsSTRIKETHROUGH- Strikethrough text
Gradient Text
from printfx import PrintFX
printer = PrintFX()
printer.gradient(
"Gradient Text Example!",
start="#ff0000",
end="#0000ff"
)
Advanced Usage
from printfx import PrintFX
# Create printer with default settings
printer = PrintFX("BLUE")
# Change color and style at runtime
printer.printfx("Red bold text", color="RED", font_style="BOLD")
printer.printfx("Green underlined text", color="GREEN", font_style="UNDERLINE")
# Combine multiple effects
printer.printfx("Magenta italic text", color="MAGENTA", font_style="ITALIC")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
printfxpy-1.2.1.tar.gz
(4.5 kB
view details)
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 printfxpy-1.2.1.tar.gz.
File metadata
- Download URL: printfxpy-1.2.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a79c2231e1eaee79ceab940ce5bb3afe07368cb191cc8fa39570e226c6b99ca4
|
|
| MD5 |
244523b7befb92923f9a9b16ea4c5a9c
|
|
| BLAKE2b-256 |
bb88fb5308bd35018b9d083678349aa1f8abd62cce9178ca66848236cff976de
|
File details
Details for the file printfxpy-1.2.1-py3-none-any.whl.
File metadata
- Download URL: printfxpy-1.2.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
770123b216237c353b329e2121456ad761c7629133934030bfe012f7b12ebdb6
|
|
| MD5 |
61b9b693acbad9ab7c2fd5a9c7e280a9
|
|
| BLAKE2b-256 |
d5679a462029058a198149d2f501fcef0cd067d7fdc37e1ebe022a08493e1586
|