Skip to content

tommyip/tabled

Repository files navigation

tableD

Tavis CI Coveralls Read The Docs MIT license

tableD: Tables for Humans?

tableD pretty prints your data in a tabular format. With its clean and simple API, you can generate fancy tables in no time! And did I mention it is extremely flexible and configurable?

Quick start:

>>> headings = ['x', 'f(x) = x^2', 'f(x) = x^x']
>>> data = [[x, x**2, x**x] for x in range(1, 11)]

# Generate table!
>>> tabled.new(headings, data, style='terminal').show()
╔════╦════════════╦═════════════╗
║ xf(x) = x^2f(x) = x^x  ║
╠════╬════════════╬═════════════╣
║ 111           ║
║ 244           ║
║ 3927          ║
║ 416256         ║
║ 5253125        ║
║ 63646656       ║
║ 749823543      ║
║ 86416777216    ║
║ 981387420489   ║
║ 1010010000000000 ║
╚════╩════════════╩═════════════╝

Full documentation is available at Read the Docs.