jazzband / tablib

Python Module for Tabular Datasets in XLS, CSV, JSON, YAML, &c.
https://tablib.readthedocs.io/
MIT License
4.6k stars 591 forks source link

Plain text / Terminal formatter #317

Open davidfischer opened 6 years ago

davidfischer commented 6 years ago

I thought I would open an issue to gauge interest in a terminal / plain text formatter. This possible formatter would print or read data from space padded plain text.

import tablib

data = tablib.Dataset()
data.headers = ('first_name', 'last_name')
data.append(('John', 'Adams'))
data.append(('George', 'Washington'))
print data.export('txt')
# first_name           last_name
# John                 Adams
# George               Washington

If you think this is useful and fits with the philosophy of the project, I could put together a PR.

There are definitely some differences between this and some of the other formatters including:

zobnec commented 6 years ago

Yeah,I think it's interesting and useful

Sahnesiguzel33 commented 1 year ago

bencede