Skip to main content

Generate simple tables in terminals from a nested list of strings. (has wheels!)

Project description

terminaltables

Forked because original project's repo is ARCHIVED and there are no wheels for the old project in pypi.

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: example1.py example2.py <https://github.com/Robpol86/terminaltables/blob/master/example2.py>, and example3.py <https://github.com/Robpol86/terminaltables/blob/master/example3.py>

.. changelog-section-start

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terminaltables-3.1.6.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

terminaltables-3.1.6-py2.py3-none-any.whl (15.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file terminaltables-3.1.6.tar.gz.

File metadata

  • Download URL: terminaltables-3.1.6.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for terminaltables-3.1.6.tar.gz
Algorithm Hash digest
SHA256 205ffea11d84956889851560874268693adaf08e02f942ad2fbbc08fcab18ebb
MD5 3968f1c4c235b2084fa5830451bf23d6
BLAKE2b-256 cf55c0f3ea1e5d20d3da27bfaa5902edfd7477793bb4d7bd846ecc28e2f8dd98

See more details on using hashes here.

File details

Details for the file terminaltables-3.1.6-py2.py3-none-any.whl.

File metadata

  • Download URL: terminaltables-3.1.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for terminaltables-3.1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bb670016abe42d57c64a5dbae654ff07786b4dbab0a9bfb5858759bf03f06a4b
MD5 c2466b6c1d67bcf72dc5a6ca00df032d
BLAKE2b-256 5a16dd906e12ee828fe64da455decb078bb25b06cf80f9f626ca21d278b867b6

See more details on using hashes here.

Supported by

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