Skip to main content

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

Reason this release was yanked:

Use terminaltables3

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

terminaltables_whl-3.1.2-py2.py3-none-any.whl (15.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file terminaltables_whl-3.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: terminaltables_whl-3.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.1

File hashes

Hashes for terminaltables_whl-3.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a9729f9cdf886168d3405db9e8fbb9493b50042044ba7b7bb9434518a81c4ed8
MD5 289ba12f077b0c9b2a0a618e4e6e44d0
BLAKE2b-256 0e62c3f2797c644c2442594f258d55e591b6e501d7e44e397ebf798353cdb908

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