Skip to main content

terminaltables

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

Build Status Windows Build Status Coverage Status Latest Version

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, and example3.py

Changelog

This project adheres to Semantic Versioning.

3.1.0 - 2016-10-16

Added

3.0.0 - 2016-05-30

Added
Changed
  • Refactored again, but this time entire project including tests.

Removed
  • padded_table_data property and join_row(). Moving away from repeated string joining/splitting.

Fixed

2.1.0 - 2015-11-02

Added

2.0.0 - 2015-10-11

Changed
  • Refactored code. No new features.

  • Breaking changes: UnixTable/WindowsTable/WindowsTableDouble moved. Use SingleTable/DoubleTable instead.

1.2.1 - 2015-09-03

Fixed

1.2.0 - 2015-05-31

Added
  • Bottom row separator.

1.1.1 - 2014-11-03

Fixed
  • Python 2.7 64-bit terminal width bug on Windows.

1.1.0 - 2014-11-02

Added
  • Windows support.

  • Double-lined table.

1.0.2 - 2014-09-18

Added
  • table_width and ok properties.

1.0.1 - 2014-09-12

Added
  • Terminal width/height defaults for testing.

  • terminaltables.DEFAULT_TERMINAL_WIDTH

  • terminaltables.DEFAULT_TERMINAL_HEIGHT

1.0.0 - 2014-09-11

  • Initial release.

Metadata

Release files for terminaltables 3.1.0

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.0
File Size Uploaded
terminaltables-3.1.0.tar.gz 12.5 kB Details

Release files / terminaltables-3.1.0.tar.gz

Download URL terminaltables-3.1.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f3eb0eb92e3833972ac36796293ca0906e998dc3be91fbe1f8615b331b853b81
BLAKE2b-256 checksum
How to use checksums
9bc44a21174f32f8a7e1104798c445dacdc1d4df86f2f26722767034e4de4bff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

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

This release

3.1.0 This release

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