Skip to main content

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

Example Scripts Screenshot

Source code for examples:

Change Log

Metadata

Release files for terminaltables3 4.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for terminaltables3 4.0.0
File Size Uploaded
terminaltables3-4.0.0.tar.gz 12.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for terminaltables3 4.0.0
File Interpreter ABI Platform
terminaltables3-4.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.6 kB

Release files / terminaltables3-4.0.0.tar.gz

Download URL terminaltables3-4.0.0.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4e3eefe209aa89005a0a34d1525739424569729ee29b5e64a8dd51c5ebdab77f
BLAKE2b-256 checksum
How to use checksums
559b9abd7feb0cf552061cfa452c22773f3158cdad877ad5623f13edfa07116f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / terminaltables3-4.0.0-py3-none-any.whl

Download URL terminaltables3-4.0.0-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93b4c722f35400a7869cd630e2bbab616b129d1c47c628765c7f47baab2ca270
BLAKE2b-256 checksum
How to use checksums
ea666053d908e5789877ee702c102935634961a731e3db7d1caa2f1201a99598
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

4.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page