Skip to main content

Default template for PDM package

Project description

stringstyler

Add color and change the format of your strings !

Usage

The print_color_text() function

The print_color_text() function :

from stringstyler import print_styler


print_color_text('Hello, World!', 'red')
print_color_text('Hello, World!', 'red', style='bold')
print_color_text('Hello, World!', 'green', style='underline')
print_color_text('Hello, World!', 'blue', style='reverse')
print_color_text('Hello, World!', 'magenta', style='invisible')
print_color_text('Hello, World!', 'cyan', style='strikethrough')

The text_styler decorator

from stringstyler import text_styler

@text_styler(color="yellow", style="bold")
def greet(name: str):
    """Greets a person by name."""
    return f"Hello, {name}!"

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

stringstyler-0.2.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

stringstyler-0.2.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file stringstyler-0.2.0.tar.gz.

File metadata

  • Download URL: stringstyler-0.2.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.19.2 CPython/3.12.7 Darwin/23.6.0

File hashes

Hashes for stringstyler-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3215f54cc452949ca2ea4f5d43510de23915f0afa65f3ef0999aca2af1befa95
MD5 03153d81ec68ad0fc57bf37f1520cc23
BLAKE2b-256 fe194a3060e1ddfe2579214b1d47012a8ecb7f183faf8dd3616d4633439be5b6

See more details on using hashes here.

File details

Details for the file stringstyler-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: stringstyler-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.19.2 CPython/3.12.7 Darwin/23.6.0

File hashes

Hashes for stringstyler-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53a9d2deb35bd590df4ce8a104ab2478afbed9fb34b3e6b5423af86ad27b4383
MD5 b0c777f646fce2b450529c12e96410ba
BLAKE2b-256 2e46b6a75274ffd5b14c5000de02b66e341e0a5f029ad6fe08e2a539b1083455

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