Skip to main content

A simple package for displaying calculation results in a textbased table

Project description

resf - Result Formatter

A simple package for displaying calculation results in a textbased table


How to use

Basics

from resf import *

initRes()                                   # Initializes new Table
addRes('Name', value, 'Unit', precision)    # add a value to the table
addRes('Name', value)                       # unit and precision are not required
printRes()                                  # prints the resulting table

Sample 1

foo = 15
bar = 123 / 13

initRes()
addRes('Foo', foo, 'V')
addRes('5 digits of Bar', bar, precision=5)
printRes()

Output 1

 +-----------------+----------------+
 | Name            | Value [Unit]   |
 |-----------------+----------------|
 | Foo             | 15.00 V        |
 | 5 digits of Bar | 9.46154        |
 +-----------------+----------------+

Uses tabulate to generate the table

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for resf, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size resf-0.1.3-py3-none-any.whl (3.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size resf-0.1.3.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page