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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file terminaltables3-4.0.0.tar.gz.
File metadata
- Download URL: terminaltables3-4.0.0.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e3eefe209aa89005a0a34d1525739424569729ee29b5e64a8dd51c5ebdab77f
|
|
| MD5 |
4f5530d10f5a63c0f7f339b600995cbc
|
|
| BLAKE2b-256 |
559b9abd7feb0cf552061cfa452c22773f3158cdad877ad5623f13edfa07116f
|
File details
Details for the file terminaltables3-4.0.0-py3-none-any.whl.
File metadata
- Download URL: terminaltables3-4.0.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93b4c722f35400a7869cd630e2bbab616b129d1c47c628765c7f47baab2ca270
|
|
| MD5 |
8b536a08ad91ebcc98ce371b8594ed31
|
|
| BLAKE2b-256 |
ea666053d908e5789877ee702c102935634961a731e3db7d1caa2f1201a99598
|