Skip to main content

terminaltables

What is it

Easily draw tables in terminal/console applications from a list of lists of strings. Supports multi-line rows.

  • Python 2.6, 2.7, PyPy, PyPy3, 3.3, 3.4, and 3.5+ supported on Linux and OS X.
  • Python 2.7, 3.3, 3.4, and 3.5+ supported on Windows (both 32 and 64 bit versions of Python).

📖 Full documentation: https://robpol86.github.io/terminaltables

Quickstart

Install:

pip install terminaltables

Usage:

from terminaltables 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

Release files for terminaltables 3.1.10

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

Source distribution (sdist)

Source distribution for terminaltables 3.1.10
File Size Uploaded
terminaltables-3.1.10.tar.gz 12.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for terminaltables 3.1.10
File Interpreter ABI Platform
terminaltables-3.1.10-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 27.4 kB

Release files / terminaltables-3.1.10.tar.gz

Download URL terminaltables-3.1.10.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ba6eca5cb5ba02bba4c9f4f985af80c54ec3dccf94cfcd190154386255e47543
BLAKE2b-256 checksum
How to use checksums
f5fc0b73d782f5ab7feba8d007573a3773c58255f223c5940a7b7085f02153c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.7

Release files / terminaltables-3.1.10-py2.py3-none-any.whl

Download URL terminaltables-3.1.10-py2.py3-none-any.whl
Size 15.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e4fdc4179c9e4aab5f674d80f09d76fa436b96fdc698a8505e0a36bf0804a874
BLAKE2b-256 checksum
How to use checksums
c4fbea621e0a19733e01fe4005d46087d383693c0f4a8f824b47d8d4122c87e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.7

Release history Release notifications | RSS feed

This release

3.1.10 This release

2 release files

3.1.9

2 release files

3.1.8

2 release files

3.1.7

2 release files

3.1.6

2 release files

3.1.5

1 release file

3.1.0

1 release file

3.0.0

1 release file

2.1.0

1 release file

2.0.0

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

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