Skip to main content

A simple and colorful text printing library for Python

Project description

Printfxpy

PyPI version Downloads Python 3.8+ License Discord

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:

Discord

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, WHITE
  • BRIGHT_BLACK, BRIGHT_RED, BRIGHT_GREEN, BRIGHT_YELLOW, BRIGHT_BLUE, BRIGHT_MAGENTA, BRIGHT_CYAN, BRIGHT_WHITE

Available Font Styles

  • NORMAL - Default text style
  • BOLD - Bold text
  • DIM - Dimmed text
  • ITALIC - Italic text
  • UNDERLINE - Underlined text
  • BLINK - Blinking text
  • REVERSE - Reversed colors
  • STRIKETHROUGH - 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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

printfxpy-1.2.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

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

Hashes for printfxpy-1.2.1.tar.gz
Algorithm Hash digest
SHA256 a79c2231e1eaee79ceab940ce5bb3afe07368cb191cc8fa39570e226c6b99ca4
MD5 244523b7befb92923f9a9b16ea4c5a9c
BLAKE2b-256 bb88fb5308bd35018b9d083678349aa1f8abd62cce9178ca66848236cff976de

See more details on using hashes here.

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

Hashes for printfxpy-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 770123b216237c353b329e2121456ad761c7629133934030bfe012f7b12ebdb6
MD5 61b9b693acbad9ab7c2fd5a9c7e280a9
BLAKE2b-256 d5679a462029058a198149d2f501fcef0cd067d7fdc37e1ebe022a08493e1586

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page