pri22296 / beautifultable

Python package for printing visually appealing tables on a terminal.
MIT License
149 stars 18 forks source link
ascii-table python3 table terminal utility

########################################################################## beautifultable ##########################################################################

.. inclusion-marker-badges-start

.. image:: https://badge.fury.io/py/beautifultable.svg :target: https://badge.fury.io/py/beautifultable

.. image:: https://img.shields.io/pypi/pyversions/beautifultable.svg :target: https://pypi.python.org/pypi/beautifultable/

.. image:: https://codecov.io/gh/pri22296/beautifultable/branch/master/graphs/badge.svg :target: https://codecov.io/gh/pri22296/beautifultable/branch/master/

.. image:: https://api.codacy.com/project/badge/Grade/7a76eb35ad4e450eaf00339e98381511 :target: https://www.codacy.com/app/pri22296/beautifultable?utm_source=github.com&utm_medium=referral&utm_content=pri22296/beautifultable&utm_campaign=Badge_Grade

.. image:: https://github.com/pri22296/beautifultable/actions/workflows/build.yml/badge.svg?branch=master :target: https://github.com/pri22296/beautifultable/actions/workflows/build.yml

.. image:: https://readthedocs.org/projects/beautifultable/badge/?version=latest :alt: Documentation Status :target: http://beautifultable.readthedocs.io/en/latest/?badge=latest

.. image:: https://img.shields.io/badge/Donate-PayPal-yellow.svg :target: https://paypal.me/beautifultable

.. inclusion-marker-badges-end

.. inclusion-marker-introduction-start


Introduction


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

Features included but not limited to:

.. inclusion-marker-introduction-end

.. inclusion-marker-links-start


Links


.. inclusion-marker-links-end

.. inclusion-marker-usage-start


Usage


Here is an example of how you can use beautifultable::

>>> from beautifultable import BeautifulTable
>>> table = BeautifulTable()
>>> table.rows.append(["Jacob", 1, "boy"])
>>> table.rows.append(["Isabella", 1, "girl"])
>>> table.rows.append(["Ethan", 2, "boy"])
>>> table.rows.append(["Sophia", 2, "girl"])
>>> table.rows.append(["Michael", 3, "boy"])
>>> table.rows.header = ["S1", "S2", "S3", "S4", "S5"]
>>> table.columns.header = ["name", "rank", "gender"]
>>> print(table)
+----+----------+------+--------+
|    |   name   | rank | gender |
+----+----------+------+--------+
| S1 |  Jacob   |  1   |  boy   |
+----+----------+------+--------+
| S2 | Isabella |  1   |  girl  |
+----+----------+------+--------+
| S3 |  Ethan   |  2   |  boy   |
+----+----------+------+--------+
| S4 |  Sophia  |  2   |  girl  |
+----+----------+------+--------+
| S5 | Michael  |  3   |  boy   |
+----+----------+------+--------+

You can learn more about beautifultable at this Tutorial <http://beautifultable.readthedocs.io/en/latest/quickstart.html>_

.. inclusion-marker-usage-end

.. inclusion-marker-install-start


Installation


::

python3 -m pip install beautifultable

.. inclusion-marker-install-end

.. inclusion-marker-changelog-start


Changelog


=========== Development

========== v1.1.0

========== v1.0.1

========== v1.0.0

========== v0.8.0

========== v0.7.0

========== v0.6.0

========== v0.5.3

========== v0.5.2

========== v0.5.1

========== v0.5.0

========== v0.4.0

========== v0.3.0

========== v0.2.0

========== v0.1.3

========== v0.1.2

========== v0.1.1

.. inclusion-marker-changelog-end

.. inclusion-marker-contribution-start


Contribute


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

.. inclusion-marker-contribution-end

.. inclusion-marker-license-start


License


This project is licensed under the MIT License - see the LICENSE.txt <https://github.com/pri22296/beautifultable/blob/master/LICENSE.txt>_ file for details.

.. inclusion-marker-license-end

.. inclusion-marker-donation-start


Donation


Love beautifultable? Consider supporting the development :)

.. image:: https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif :target: https://paypal.me/beautifultable

.. inclusion-marker-donation-end