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 Distribution

stylepy-0.8.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

stylepy-0.8-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

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