Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.17 KB

README.md

File metadata and controls

32 lines (21 loc) · 1.17 KB

Pylsy

Build Status

Pylsy is a simple Python library for drawing tables in the terminal/console. Just two lines of code!

image

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