Unit of Measure conversion tool
Project description
UOM
Static code analysis
Tools | Badges |
---|---|
Scrutinizer | |
Codacy | |
Codecov | |
Coveralls | |
CodeQL | |
CircleCI | |
TravisCI | |
PyPI |
Description
Python unit of measure (UOM) 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 a extra unit aliases and "unitless" particular unit that cannot be converted.
The units are case sensitives.
Where to get it
The source code is hosted 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 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 Distribution
Built Distribution
File details
Details for the file uom-0.6.1.tar.gz
.
File metadata
- Download URL: uom-0.6.1.tar.gz
- Upload date:
- Size: 39.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b495d8ddd4ae9b9171fab9ceca7813251214fc71af773ac9fe42d1a15fe14dcd |
|
MD5 | 3b97d6177ea6013a284e1d324bd9f945 |
|
BLAKE2b-256 | 965c02c2f22356fb824896fa1ed69839e3fb4fb9c8ce0b9adfcb654f4f7b5960 |
File details
Details for the file uom-0.6.1-py2.py3-none-any.whl
.
File metadata
- Download URL: uom-0.6.1-py2.py3-none-any.whl
- Upload date:
- Size: 37.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d28477ac71044df0e4c9ba606580980248874e7d40bc9c10eb94d0fb2643697c |
|
MD5 | 71b6a4e6817dad3406cc7f6743573cae |
|
BLAKE2b-256 | 5775a9e1b6afcabf01b48dd0b80b3d22292804544297e04fa7219dd469c73dd8 |