Skip to main content

A simple Python library for easily displaying tabular data in a visually appealing ASCII table format

Project description

ptable2 is a simple Python library designed to make it quick and easy to represent tabular data in visually appealing ASCII tables, originally forked from PTable.

Build Status Code Health Coverage

Installation

As ptable2 is a fork of PrettyTable, and compatible with all its APIs, so ptable2 is usage is the same as PrettyTable, and the installation would cover on the original PrettyTable.

As always, you can install ptable2 in 3 ways.

Via pip (recommend):

pip install ptable2

From source:

python setup.py install

Quick start

ptable2 supports two kinds of usage:

As a library

ptable2 library API is almost as PrettyTable, you can import the same API from prettytable library:

from prettytable import PrettyTable
x = PrettyTable()

A better hosted document is hosted on ReadTheDocument.

As command-line tool

This is an original function of ptable2, can be used as ptable command:

ptable --csv somefile.csv

or a Unix style pipe:

cat somefile.csv | ptable

Will both print a ASCII table in terminal.

Project details


Download files

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

Source Distribution

ptable2-0.9.3.linux-x86_64.tar.gz (34.6 kB view hashes)

Uploaded Source

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