Skip to main content

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, and hide.
    • Supports combining multiple font styles (e.g., "bold+italic")
  • Compatibility:
    • Supports all standard print() parameters: sep, end, file, and flush.

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")

image

Example 2 (Override Built-in print())

from printly import print
print("I am a hacker!", fg="lime", bg="black", fs="bold+italic")

image

2. style() Function

Apply foreground color, background color, and font style to text.

Example

from printly import style
msg = style("I love you! 💓", bg="hotpink", fg="deeppink", fs="bold")
print(msg)

image

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

printly-0.4.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

printly-0.4.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file printly-0.4.0.tar.gz.

File metadata

  • Download URL: printly-0.4.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for printly-0.4.0.tar.gz
Algorithm Hash digest
SHA256 b99f316973fec7e2a769bb7ff09adba7ff9376369cb06262880eab1fbfbda27e
MD5 5bc0a52c5e950ca0e8f0fd2244c7a013
BLAKE2b-256 6ef5a9c620cc17962e1a392f2af80a53a150691a282203e17bdcd9f58f70f961

See more details on using hashes here.

File details

Details for the file printly-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: printly-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for printly-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b02c78fb1e00bce7114f271bba60eef077070bb78234d903b31a6099e8b706c
MD5 52fd1760c1053184c7dc17b4461835d7
BLAKE2b-256 243f9c334f9e25c52aa52e4e06f64b3b77f8659ae297db2d32a3ae2d2a1bf6f2

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