Skip to content
/ Pylsy Public
forked from Mesaukee/Pylsy

Pylsy is a simple Python library draw tables in the Terminal.Just two lines of code .

License

Notifications You must be signed in to change notification settings

210230/Pylsy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"]
Then, add the values to the table
table.add_data("name",name)
if you want to insert some values to the same column,you can pass string or list as a parameter
table.append_data("name","leviathan") or table.append_data("name",["leviathan"])
After populating each attribute and adding the values to the table, you can create the ASCII table
print(table)

License

MIT

About

Pylsy is a simple Python library draw tables in the Terminal.Just two lines of code .

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.3%
  • Shell 1.7%