Skip to main content

Generate simple tables in terminals from a nested list of strings.

Project description


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:



pip install terminaltables


from terminaltables import AsciiTable

table_data = [
    ['Heading1', 'Heading2'],
    ['row1 column1', 'row1 column2'],
    ['row2 column1', 'row2 column2'],
    ['row3 column1', 'row3 column2']
table = AsciiTable(table_data)
| 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

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.10.tar.gz (12.3 kB view hashes)

Uploaded source

Built Distribution

terminaltables-3.1.10-py2.py3-none-any.whl (15.2 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page