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.
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.
Relative links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ptable2-0.9.3.linux-x86_64.tar.gz
.
File metadata
- Download URL: ptable2-0.9.3.linux-x86_64.tar.gz
- Upload date:
- Size: 34.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b301c39346e21a71d51357e371bc0ad9f2831f04c444c73f8371c4781c17a453 |
|
MD5 | c953f0fcf295502319a2b449aaccc0fe |
|
BLAKE2b-256 | 18dccd8d801441aff95601fe695c306eaf63120707a162a63295ae3eb498970f |