Skip to main content

FaSt_PUC converts numbers to strings with appropriate unit prefix.

Project description

FaSt_PUC

FaSt_PUC is a pretty unit converter. It creates a string with suitable SI-prefix.

Written by Fabian Stutzki, fast@fast-apps.de

licensed under MIT

Usage

The package has to be imported:

import fast_puc

It can be used very easily:

puc(1.0001)  # "1"
puc(1.0001, "m")  # "1m"
puc(0.991e-6, "s")  # "991ns"
puc(1030e-9, "m")  # "1.03µm"

Unit supports some special characters:

puc(1.0001, " m")  # "1 m"  # space
puc(1.0001, "_m")  # "1_m"  # underscore
puc(0.911, "%")  # "91.1%"  # percent
puc(1001, "dB")  # "30dB"  # conversion to dB
puc(1030e-9, "!m")  # "1p03um"  # file name compatible

Project details


Download files

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

Source Distribution

fast_puc-0.1.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

fast_puc-0.1.0-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page