beautifultable

1.1.0 · maintenance · verified Fri Apr 17

beautifultable is a Python library for printing beautiful, structured text tables in terminals, making CLI output more readable. Its current stable version is 1.1.0, released in January 2020. The project appears stable and feature-complete but has not seen active development or new releases since 2020, so its release cadence is infrequent.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to create a BeautifulTable, set column headers, add rows, and customize column alignment. The output is a formatted string ready for terminal display.

from beautifultable import BeautifulTable

table = BeautifulTable()
table.columns.header = ["Name", "Age", "City"]
table.rows.append(["John", 30, "New York"])
table.rows.append(["Jane", 25, "London"])
table.rows.append(["Doe", 35, "Paris"])

# Example of setting column alignment
table.columns.align["Age"] = BeautifulTable.ALIGN_RIGHT

print(table)

view raw JSON →