Skip to main content

UOM

Static code analysis

Tools Badges
Scrutinizer Scrutinizer Code Quality Code Coverage Build Status Code Intelligence Status
Codacy Codacy Badge
Codecov codecov
Coveralls Coverage Status
CodeQL CodeQL
CircleCI CircleCI
TravisCI Build Status
Fossa FOSSA Status
PyPI PyPI Latest Release Package Status Python
PePy Downloads Downloads Downloads
Code formatting Code style: black

Description

Python unit of measure (UOM) conversion tool

Energistics UOM 1.0 (https://www.energistics.org/energistics-unit-of-measure-standard/) is the primary source of conversion factors and unit symbols. We extended it with additional unit aliases and a "unitless" unit that doesn't have any conversion.

The units are case-sensitive.

Where to get it

The source code is available on GitHub at: https://github.com/Schlumberger/UOM

Binary installers for the latest released version are available at the Python Package Index (PyPI).

pip install uom

Usage

Please find 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

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

Return the base SI ( https://en.wikipedia.org/wiki/International_System_of_Units) unit. If you are using unit alias you can find the compatible 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 on the issue list.

License

FOSSA Status

Metadata

Release files for uom 0.6.7

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

Source distribution (sdist)

Source distribution for uom 0.6.7
File Size Uploaded
uom-0.6.7.tar.gz 39.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for uom 0.6.7
File Interpreter ABI Platform
uom-0.6.7-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 78.3 kB

Release files / uom-0.6.7.tar.gz

Download URL uom-0.6.7.tar.gz
Size 39.9 kB
Tags Source
SHA-256 checksum
How to use checksums
05c9db7dad7251892ff86efa6c8ec5c32bea95b3bbd71faae433caee211893c2
BLAKE2b-256 checksum
How to use checksums
9351b095f230df6afc36681131c903fa201ddc75ad14e0a186b9e3be66d6b7c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / uom-0.6.7-py2.py3-none-any.whl

Download URL uom-0.6.7-py2.py3-none-any.whl
Size 38.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ac4c80e92d4085a6d531ffdd4585a637edc855ce5ea9ee4ade35ddd154bb980f
BLAKE2b-256 checksum
How to use checksums
70cbac2997a336d638eb2c710f8cbcb9656413d7759e977ae5f83aed13ef9bf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.6.7 This release

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

1 release file

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