Skip to main content

Utility package to print visually appealing ASCII tables to terminal

Project description

https://badge.fury.io/py/beautifultable.svg https://img.shields.io/pypi/pyversions/beautifultable.svg https://coveralls.io/repos/github/pri22296/beautifultable/badge.svg?branch=master https://api.codacy.com/project/badge/Grade/7a76eb35ad4e450eaf00339e98381511 Code Health https://travis-ci.org/pri22296/beautifultable.svg?branch=master Documentation Status

Introduction

This Package provides BeautifulTable class for easily printing tabular data in a visually appealing ASCII format to a terminal.

Features include:

  • Full customization of the look and feel of the Table

  • Build the Table as you wish, By adding Rows, or by columns or even mixing both these approaches.

Usage

Here is an example of how you can use beautifultable:

>>> from beautifultable import BeautifulTable
>>> table = BeautifulTable()
>>> table.column_headers = ["name", "rank", "gender"]
>>> table.append_row(["Jacob", 1, "boy"])
>>> table.append_row(["Isabella", 1, "girl"])
>>> table.append_row(["Ethan", 2, "boy"])
>>> table.append_row(["Sophia", 2, "girl"])
>>> table.append_row(["Michael", 3, "boy"])
>>> print(table)
+----------+------+--------+
|   name   | rank | gender |
+----------+------+--------+
|  Jacob   |  1   |  boy   |
+----------+------+--------+
| Isabella |  1   |  girl  |
+----------+------+--------+
|  Ethan   |  2   |  boy   |
+----------+------+--------+
|  Sophia  |  2   |  girl  |
+----------+------+--------+
| Michael  |  3   |  boy   |
+----------+------+--------+

You can learn more about beautifultable at this Tutorial

Installation

pip install beautifultable

Contribute

If you have any suggestions or bug reports, Please create a Issue. Pull Requests are always welcome.

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

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

beautifultable-0.4.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

beautifultable-0.4.0-py2.py3-none-any.whl (17.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file beautifultable-0.4.0.tar.gz.

File metadata

File hashes

Hashes for beautifultable-0.4.0.tar.gz
Algorithm Hash digest
SHA256 f270a4dd39ede51c9a11c9fe84bef3cd381f2bbc58b5053f9aff1b5dac5c0ddf
MD5 06eaa677860e0ce2962b068ff0dc4347
BLAKE2b-256 5b4fb0e496789fc2089ed2ef897913bc5e1f7ac47622e9b121b792a98d99ef8f

See more details on using hashes here.

File details

Details for the file beautifultable-0.4.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for beautifultable-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d664f07b8431e6e1f93796fe6e2c2b5286aa8f880a07ef8bbadef716063aa3ec
MD5 d7548c32add52e2b9f75fe29510cd34d
BLAKE2b-256 4c58a5e44d239c71b4a94ba8c022610aba30d2c26d7307b0bb214a183aa04644

See more details on using hashes here.

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