PyTQL is a simple python table data type
with some query operations.
If you are working with python and you need a way to visaulize and interact with
your data then PyTQL is the package for you.
Install pytql with pip3
pip3 install pytql==[version]
current version = 0.0.3
from pytql.model import Model
from pytql.fields import CharField, IntField
from pytql.colors import Color
from pytql.table import Table
from pytql.repl import start_client, ReplType
class Student(Model):
first_name = CharField(name="First Name", max_length=20)
last_name = CharField()
age = IntField()
length = IntField()
# Data to populate Student table.
student_data = [
["Richard", "Quaicoe", 23, 243],
["Mike", "Kuam", 33, 123],
["Roynam", "Skim", 13, 56],
["Leon", "Santa", 29, 23],
["Geroge"],
]
# Example with passing data with `Student` Model.
student_table = Table(
model=Student,
data=student_data,
header_color=Color.cyan,
row_color=Color.green,
table_color=Color.red,
)
student_table.draw_table()
Check docs for more information about the project and api references.