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 |
+--------------+--------------+

To add a separator between selected rows, enable inner_separators and place the delimiter in the first cell of a marker row. The optional second cell is a title for that separator:

table = AsciiTable([["Name"], ["Ada"], ["---", "Group B"], ["Bob"]])
table.inner_separators = True
print(table.table)

The delimiter defaults to "---" and can be changed with table.inner_separators_delimiter. Existing rows keep their usual meaning until inner_separators is enabled. Markdown tables continue to render marker rows as data.

Example Implementations

Example Scripts Screenshot

Source code for examples:

Change Log

Run tests on Linux locally

With Docker Desktop running:

docker build -f Dockerfile.test -t terminaltables3-tests .
docker run --rm terminaltables3-tests

The image uses Debian slim with Python 3.12 and runs the full quality gate.

Local development

Install uv, then run:

uv sync --frozen
make check

make check runs the same full quality gates as the Python 3.12 Linux job in GitHub Actions and the GitLab quality job. The other GitHub Actions jobs run make test's pytest command on the remaining Python and operating system combinations. Run make to list all available targets.

Metadata

Release files for terminaltables3 4.1.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.1.0
File Size Uploaded Provenance Actions
terminaltables3-4.1.0.tar.gz 601.8 kB With provenance Details for terminaltables3-4.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 618.6 kB

Release files / terminaltables3-4.1.0.tar.gz

Download URL terminaltables3-4.1.0.tar.gz
Size 601.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d54edc0407cf12326d3fdcbb6329165ef9e90c5948f374ca414f05056ea2806c
BLAKE2b-256 checksum
How to use checksums
e6003d39132b17a2362bf03063c1c2bc641259d62d1dd6634830194585f63da8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

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

Download URL terminaltables3-4.1.0-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31b136b712cac210426a1846efc5e4d641b11152428cc6c69aa3214f7c70c744
BLAKE2b-256 checksum
How to use checksums
42bb3ad7bc6c89140f053b555eb24ac739467d02d045aaf20be700ad41dabc2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for terminaltables3 4.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for terminaltables3-4.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.1.0 This release

2 release files Full provenance

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