Skip to main content

Format CLI output like HTML.

Project description

stylepy

PyPI version

stylepy is a Python module that provides utilities for formatting text in various styles and complexities.

Installation

You can install stylepy via pip:

pip install stylepy

Usage Examples for stylepy Module

Headings

from stylepy import h1, h2, h3, h4, h5, h6

h1("Heading 1")
h2("Heading 2")
h3("Heading 3")
h4("Heading 4")
h5("Heading 5")
h6("Heading 6")

Listings

from stylepy import ordered_list, bullet_list

items = ["Item 1", "Item 2", "Item 3"]
ordered_list(items)
bullet_list(items)

Blockquote

from stylepy import blockquote

items = ["Quote 1", "Quote 2", "Quote 3"]
blockquote(items)

Span

from stylepy import span

span("This text is bold")

Pretty JSON

from stylepy import pretty_json

data = {"key": "value"}
pretty_json(data)

Tabular List

from stylepy import tabular_list

data = [
    ("Header 1", "Header 2"),
    ("Value 1", "Value 2"),
    ("Value 3", "Value 4")
]
tabular_list(data)

Time Complexity

from stylepy import timeComplexity

timeComplexity("O(n^2)", "Worst-case time complexity")

Space Complexity

from stylepy import spaceComplexity

spaceComplexity("O(n)", "Space complexity")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

stylepy-0.4-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file stylepy-0.4-py3-none-any.whl.

File metadata

  • Download URL: stylepy-0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for stylepy-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e7d752714dd850937f1b5bd86999c29bdd0b4a7f43c1983a4c2b037a5b7a7df0
MD5 add6d5dd1b08f403895c7df1e47ec15e
BLAKE2b-256 5b03ed1f75458c358d601ab2c5b79da5e1d536ffa12e2b039ab179fb7fd12f98

See more details on using hashes here.

Provenance

Supported by

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