Skip to main content

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

Example Scripts Screenshot

Source code for examples:

Change Log

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

terminaltables3-4.0.0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

terminaltables3-4.0.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

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

Hashes for terminaltables3-4.0.0.tar.gz
Algorithm Hash digest
SHA256 4e3eefe209aa89005a0a34d1525739424569729ee29b5e64a8dd51c5ebdab77f
MD5 4f5530d10f5a63c0f7f339b600995cbc
BLAKE2b-256 559b9abd7feb0cf552061cfa452c22773f3158cdad877ad5623f13edfa07116f

See more details on using hashes here.

File details

Details for the file terminaltables3-4.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for terminaltables3-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93b4c722f35400a7869cd630e2bbab616b129d1c47c628765c7f47baab2ca270
MD5 8b536a08ad91ebcc98ce371b8594ed31
BLAKE2b-256 ea666053d908e5789877ee702c102935634961a731e3db7d1caa2f1201a99598

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page