Pylsy
Pylsy is a simple Python library for drawing tables in the terminal/console. Just two lines of code!
Install
pip install pylsy
Sample Usage
At the very first start, pylsy needs to be imported
from pylsy import PylsyTable
First, you need to create a list, which will contain the table attributes
attributes=["name","age","sex","id","time"]
In the second step, you need to use PylsyTable to create the ASCII table
table=PylsyTable(attributes)
Then, you need to populate the values for each attribute and add the values to the table. Populating the values for the attribute "name" is shown below
name=["sun","lsy","luna","leviathan"]
Then, add the values to the table
table.add_data("name",name)
After populating each attribute and adding the values to the table, you can create the ASCII table
table.create_table()
License
MIT