Utility package to print visually appealing ASCII tables to terminal
Project description
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.
Links
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
Changelog
Unreleased
0.5.3
Fixed collections ABCs deprecation warning
Added support for handing color codes using ANSI escape sequences(experimental)
0.5.2
Added new style STYLE_NONE
Fixed issue regarding improper conversion of non-string floats
0.5.1
Added detect_numerics boolean for toggling automatic numeric conversion
0.5.0
Added new property serialno_header
Deprecated methods with misspelled seperator in their name. Legacy methods will be removed in 0.7.0
Fixed an issue where table was corrupted when column_count was too high
0.4.0
Added predefined styles for easier customization
Added reverse argument to sort method
Fixed enum34 dependency for python versions prior to 3.4
0.3.0
Added property serialno for auto printing serial number
Fixed an issue with sign_mode related to str conversion
Fixed bugs related to python version prior to 3.3
Fixed exception on WEP_ELLIPSIS and token length less than 3
Fixed printing issues with empty table
0.2.0
Added python 2 support
0.1.3
Bug fixes
0.1.2
Added new property default_padding
Added new method update_row
Fixed an issue in auto_calculate_width
0.1.1
Initial release on PyPI
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
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
Built Distribution
Hashes for beautifultable-0.5.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53ca7fff9fa8cf46e863cdc8540dde46079fefde7c8f45c3e5b56febef824a75 |
|
MD5 | 6a40fbb9d3e2a8cf1669de4d86a4a529 |
|
BLAKE2b-256 | 4a226ca82099e8cdd356555e25c5550f7fc0c91ceccac36402617cc88f590b9b |