Skip to content

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

License

Notifications You must be signed in to change notification settings

thombashi/pytablewriter-altcol-theme

Repository files navigation

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

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

pip install pytablewriter-altcol-theme
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()

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published