Skip to main content

str-style is a Python package for enhancing the visual appearance of text. Easily apply a variety of styles like bold, underline, colors, and more to your strings in both CLI and Python scripts.

Project description

PyPI version GuardRails badge codecov

str-style

str-style is a Python package that provides string styling functions to enhance the visual appearance of text.

Usage

To use the str-style package in CLI, yoiu simply need to run the following:

str-style red Hello world

This will print the string "Hello world" with red styling applied.

To use the str-style package in your own python script, follow these steps:

  1. Import the desired styling function(s) from strstyle module.
  2. Apply the styling function(s) to your string(s) to modify their appearance. Here's an example of how to use the red styling function:
>>> from strstyle import red
>>> print(red('Hello world'))

This will print the string "Hello world" with red styling applied.

Available CLI Styling

  • bold
  • disabled
  • italic
  • underline
  • sharp
  • invisible
  • strike-through
  • double-underline
  • black
  • red
  • green
  • orange
  • blue
  • purple
  • cyan
  • light-grey
  • red-background
  • green-background
  • yellow-background
  • blue-background
  • purple-background
  • cyan-background
  • light-grey-background
  • dark-grey
  • light-red
  • yellow
  • light-blue
  • pink
  • light-cyan

Available Styling Functions

  • bold
  • disabled
  • italic
  • underline
  • sharp
  • invisible
  • strike_through
  • double_underline
  • black
  • red
  • green
  • orange
  • blue
  • purple
  • cyan
  • light_grey
  • red_background
  • green_background
  • yellow_background
  • blue_background
  • purple_background
  • cyan_background
  • light_grey_background
  • dark_grey
  • light_red
  • yellow
  • light_blue
  • pink
  • light_cyan

Contributing

Contributions to str-style are welcome! If you encounter any issues, have suggestions, or want to contribute improvements, please feel free to open an issue or submit a pull request.

License

This package is licensed under the MIT License. See the LICENSE file for more details.

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

str_style-1.0.3.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.

str_style-1.0.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file str_style-1.0.3.tar.gz.

File metadata

  • Download URL: str_style-1.0.3.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.3 Linux/6.14.0-1017-azure

File hashes

Hashes for str_style-1.0.3.tar.gz
Algorithm Hash digest
SHA256 7b21a2e447bab7384647da3c9b456c0cd56f1d1454a90f30680b4725d1f5b564
MD5 faf55097f371f2d72367505750ed9ce2
BLAKE2b-256 6210a6e0c64563973d91c4c90781a2cbb6739328d49a9a420e99e6c10c95117d

See more details on using hashes here.

File details

Details for the file str_style-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: str_style-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.3 Linux/6.14.0-1017-azure

File hashes

Hashes for str_style-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 301d0c134e05190571d6b94ce9d3ba08fc3a33ea3de323ee62bc1d0b5f20a7d1
MD5 050be9c88aacaa5f6c5a14a02f169f02
BLAKE2b-256 908e336d5dfb41835210f3b8b1f50ceafb0866a76625a8968757a3f45ae7d210

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