Python3.11+ library to print tables and line charts in Terminal.
Project description
outfancy
Table printing and Line plotting in Terminal
Demonstration
what is it?
Outfancy is a Python3.11+ library to print tables in Terminal. It's a quick way to visualize data when you don't have a GUI and can be integrated easily in your programs. It's written in Python 3.6 and can quickly be installed anywhere using pip.
installation
install with pip
pip install outfancy
features
- Quick printing of tables.
- LineChart printing with linear interpolation.
- customize the separator used, width, priority of printing for each column.
- rearrange the columns in real time.
- Add labels above the table (can be autogenerated).
- Do Oneline printing, useful for real-time applications (report in screen function).
- Add colors to the field of the tables.
usage
In the interpreter
Table.
import outfancy.table
table = outfancy.table.Table()
dataset = [(1, 'Marie'), (2, 'Joseph')]
print(table.render(dataset))
Chart.
import outfancy.chart
from math import sin
line_chart = outfancy.chart.LineChart()
dataset = [(i, sin(i)) for i in range(10)]
line_chart.plot(dataset)
print(line_chart.render(color=True))
To do (Colaboration is welcome)
- Translate code to english. (Translated) (the translation need revision from a native english speaker (I speak spanish).
- Improve y_interpolation function on outfancy.chart.LineChart
Maybe add more kinds of charts on outfancy.chart.
Maybe on outfancy.table:
- Checking system on width parameter.
- Option to cancel the automatical checking of width parameter.
Others
- https://gist.github.com/carlosplanchon/986c7c11a932a7206bb3 (Funny demo with colors)
Experimental (Line Chart)
- http://showterm.io/80074a1806e78205339d6Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
outfancy-0.7.1-py3-none-any.whl
(27.6 kB
view details)
File details
Details for the file outfancy-0.7.1-py3-none-any.whl
.
File metadata
- Download URL: outfancy-0.7.1-py3-none-any.whl
- Upload date:
- Size: 27.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20e6e7f5093d5805d15a101b014be3dbb7bdbe0542135be8dd69ea0ad8ab577f |
|
MD5 | 95ab3f5f609133969cc15e50a6932c3d |
|
BLAKE2b-256 | b175a30ea778b11bfc1ebcac9c3d27a5a55d245073887f4c7d012d5e6299e359 |