Skip to main content

Default template for PDM package

Project description

stringstyler

Add color and change the format of your strings !

PyPI Version License MIT Python 3


Installation

Create and activate a virtual environment and then install stringstyler:

$ pip install stringstyler

---> 100%

Usage

The print_color_text() function

from stringstyler import print_styler


print_styler('Hello, World!', 'red')
print_styler('Hello, World!', 'red', style='bold')
print_styler('Hello, World!', 'green', style='underline')
print_styler('Hello, World!', 'blue', style='reverse')
print_styler('Hello, World!', 'magenta', style='invisible')
print_styler('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}!"

License

This project is licensed under the terms of the MIT license.

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.1.tar.gz (3.7 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.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stringstyler-0.2.1.tar.gz
  • Upload date:
  • Size: 3.7 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.1.tar.gz
Algorithm Hash digest
SHA256 888bf58419193ef57232ebf28e315a53b3ec633f2975d0d7a2c37bf4ae56cf6c
MD5 3f1426c57c3205dc986d7519a76bc14c
BLAKE2b-256 7bacb9964f9edca38d9039266028bea60386e0197102aa77a4eef19239627f79

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stringstyler-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db0c99ea6186609cdfb4b58c133cabe1b601a2d051a22648c242596a1c253a4b
MD5 13f5f87bbff40b08703a81fe1859da3e
BLAKE2b-256 2e359f00cd0b0fa0ab78ce04fd2c8fd8339d4b3766fb38d759e6191dc85c7c73

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