Generate simple tables in terminals from a nested list of strings. Fork of terminaltables.
Project description
What is it
Easily draw tables in terminal/console applications from a list of lists of strings. Supports multi-line rows.
Tested on Python 3.8+
This is a fork of the terminaltables project. Which is archived and unmaintained. This library is in a new namespace but should otherwise be a drop in replacement. Maintaining goals consist of maintaining ecosystem compatibility, type annotations and responding to community pull requests.
To Upgrade
Replace all instances of terminaltables
with terminaltables3
in your code. If other libraries depend on terminaltables
in your venv they will not conflict because it is a new namespace.
As of right now, the documentation as the robpol86 version.
📖 Full documentation: https://robpol86.github.io/terminaltables
Quickstart
Install:
pip install terminaltables3
Usage:
from terminaltables3 import AsciiTable
table_data = [
["Heading1", "Heading2"],
["row1 column1", "row1 column2"],
["row2 column1", "row2 column2"],
["row3 column1", "row3 column2"],
]
table = AsciiTable(table_data)
print
table.table
+--------------+--------------+
| Heading1 | Heading2 |
+--------------+--------------+
| row1 column1 | row1 column2 |
| row2 column1 | row2 column2 |
| row3 column1 | row3 column2 |
+--------------+--------------+
Example Implementations
Source code for examples:
Project details
Release history Release notifications | RSS feed
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
Hashes for terminaltables3-4.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93b4c722f35400a7869cd630e2bbab616b129d1c47c628765c7f47baab2ca270 |
|
MD5 | 8b536a08ad91ebcc98ce371b8594ed31 |
|
BLAKE2b-256 | ea666053d908e5789877ee702c102935634961a731e3db7d1caa2f1201a99598 |