A pytablewriter plugin to provide a theme that colored rows alternatively.
Project description
Summary
pytablewriter-altrow-theme is a pytablewriter plugin to provide a theme that colored rows alternatively.
Installation
pip install pytablewriter-altrow-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="altrow", ) writer.write_table()
- Output:
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("altrow", color="yellow") writer.write_table()
- Output:
Other Examples
HTML example: source file and the output
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
Built Distribution
Close
Hashes for pytablewriter-altrow-theme-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f30617d423259a02081182677bc0abefe0a91015da44b71f7c0f8324dc480a4d |
|
MD5 | 4e697fbfcc93a0dd8789804f6898cb3e |
|
BLAKE2b-256 | 9d8d144c978726e61b0b30a065ce3cb2ed9810fa08a8102a59029b447272c9e4 |
Close
Hashes for pytablewriter_altrow_theme-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d508866d2904130f6d3164067386d8442fb22ab4bf1a14f2c2fdd7083ec81084 |
|
MD5 | 826c4434fdf3ff3c18808114c9aca23a |
|
BLAKE2b-256 | 2f18f55b6f7bce415245eb98b5b3162220158ae767040beeda3da538138fb652 |