Skip to main content

resf - Result Formatter

A simple package for displaying calculation results in a textbased table

Install

pip install resf

pypi page


How to use

Basics

from resf import *

initRes()                                   # Initializes new Table
addRes('Name', value)                       # Add a value to the table
addRes('Name', value, 'Unit', precision)    # Unit and Precision can be set
printRes()                                  # prints the resulting table

Sample 1

foo = 15
bar = 123 / 14

initRes()
addRes('Foo', foo, 'kg')
addEmpty()                                  # Add an empty line
addRes('0 digits of Bar', bar, precision=0)
addRes('4 digits of Bar', bar, precision=4)
printRes()

Output 1

+-----------------+----------------+
| Name            | Value [Unit]   |
|-----------------+----------------|
| Foo             | 15.00 kg       |
|                 |                |
| 0 digits of Bar | 9              |
| 4 digits of Bar | 8.7857         |
+-----------------+----------------+

All Functions

initRes()
addRes(name, value, unit='', precision=2)
addEmpty()
printRes()

Uses tabulate to generate the table

Release files for resf 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for resf 0.1.4
File Interpreter ABI Platform
resf-0.1.4-py3-none-any.whl Python 3 none any Details

Release files / resf-0.1.4-py3-none-any.whl

Download URL resf-0.1.4-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7abbc087569a98d4ef3ce5643138a4ee7442152b4548591badb2763e0ba92263
BLAKE2b-256 checksum
How to use checksums
b4820dd18810c99e45cad1fbe7e2dddb5fa642ca47147839ab872379f3519b31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.7

Release history Release notifications | RSS feed

This release

0.1.4 This release

1 release file

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page