pytablewriter-altcol-theme is a pytablewriter plugin to provide a terminal theme.
Project Links
Meta
Author: Tsuyoshi Hombashi
Requires Python: >=3.7
Classifiers
Development Status
- 4 - Beta
Environment
- Plugins
Intended Audience
- Developers
- Information Technology
License
- OSI Approved :: MIT License
Operating System
- OS Independent
Programming Language
- Python :: 3
- Python :: 3.7
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3 :: Only
Topic
- Software Development :: Libraries
- Software Development :: Libraries :: Python Modules
Summary
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
Generate HTML example: source file and the output