Skip to main content

Unit of Measure conversion tool

Project description

UOM

Build Status CodeQL CircleCI Scrutinizer Code Quality Coverage Status Codacy Badge

Build package

pip3 install wheel python3 setup.py bdist_wheel

Unit of Measure conversion tool

The conversion factors and unit symbols are based on the Energistics UOM 1.0: https://www.energistics.org/energistics-unit-of-measure-standard/ extended with few extra unit aliases and “unitless” special unit that cannot be converted.

The units are case sensitives.

Install

pip install uom

Examples

Please find a few examples of possible utilization:

Find conversion factors to be applied to convert from one unit to another

from uom import conversion_factors

scale, offset = conversion_factors(source='m', target='ft')

Convert a value from one unit to another

from uom import convert_value

print(convert(value=10, source='m', target='ft'))

Return the base (SI) unit and if you are using unit alias you can find the equivalent Energistics UOM symbol

from uom import base_unit, unit_alias

print(base_unit('kft.lbf'))
print(unit_alias('kft.lbf'))

If you have suggestions for improvement or you found bugs, please don’t hesitate to put them in the issue list.

Project details


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 Distributions

uom-0.5.1-py3.10.egg (73.3 kB view details)

Uploaded Source

uom-0.5.1-py2.py3-none-any.whl (67.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file uom-0.5.1-py3.10.egg.

File metadata

  • Download URL: uom-0.5.1-py3.10.egg
  • Upload date:
  • Size: 73.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.2

File hashes

Hashes for uom-0.5.1-py3.10.egg
Algorithm Hash digest
SHA256 e2187da7a1fd3a6ac1b67e87368f87d3a0fffdd2342d8ad1687b2a4732de2d74
MD5 7c5d2185d910ed17a80824502c4dc74d
BLAKE2b-256 e0006a08a23300d42714ff7bfefdfbae6a6cd53499b041b05118dbb995ef55e1

See more details on using hashes here.

File details

Details for the file uom-0.5.1-py2.py3-none-any.whl.

File metadata

  • Download URL: uom-0.5.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 67.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.2

File hashes

Hashes for uom-0.5.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1369e5d6879cd859647cf307cfeb97f9c736ea9943a78636b4991a06aa103abc
MD5 6fde1f2c5a042c9dbed518dec3806978
BLAKE2b-256 ce0b504ee80597d7f106eb8573ebdc9cfd0e992c2553b3eb2b5d778e919d424f

See more details on using hashes here.

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