Skip to main content

pytablewriter-altcol-theme is a pytablewriter plugin to provide a terminal theme.

Project description

Summary

CI status of Linux/macOS/Windows Test coverage: coveralls CodeQL

pytablewriter-altcol-theme is a pytablewriter plugin to provide a terminal theme.

Installation

pip install pytablewriter-altcol-theme

Usage

Sample Code:
import pytablewriter as ptw

writer = ptw.TableWriterFactory.create_from_format_name(
    "markdown",
    headers=["INT", "STR"],
    value_matrix=[
        [1, "hoge"],
        [2, "foo"],
        [3, "bar"],
    ],
    margin=1,
    theme="altcol",
)
writer.write_table()

You can change the color of the theme by using the color parameter:

Sample Code:
import pytablewriter as ptw

writer = ptw.TableWriterFactory.create_from_format_name(
    "markdown",
    headers=["INT", "STR"],
    value_matrix=[
        [1, "hoge"],
        [2, "foo"],
        [3, "bar"],
    ],
    margin=1,
)

writer.set_theme("altcol", color="yellow")

writer.write_table()

Other Examples

Dependencies

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

pytablewriter-altcol-theme-0.1.1.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

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