# UOM
## Static code analysis
| Tools | Badges |
| --- | --------------------------- |
| Scrutinizer | [](https://scrutinizer-ci.com/g/Schlumberger/UOM/?branch=master) [](https://scrutinizer-ci.com/g/Schlumberger/UOM/?branch=master) [](https://scrutinizer-ci.com/g/Schlumberger/UOM/build-status/master) [](https://scrutinizer-ci.com/code-intelligence) |
| Codacy | [](https://www.codacy.com/gh/Schlumberger/UOM/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Schlumberger/UOM&utm_campaign=Badge_Grade) |
| Codecov | [](https://codecov.io/gh/Schlumberger/UOM) |
| Coveralls | [](https://coveralls.io/github/Schlumberger/UOM?branch=master) |
| CodeQL | [](https://github.com/Schlumberger/UOM/actions/workflows/codeql.yml) |
| CircleCI | [](https://circleci.com/gh/Schlumberger/UOM/tree/master) |
| TravisCI | [](https://travis-ci.com/Schlumberger/UOM) |
| Fossa | [](https://app.fossa.com/projects/git%2Bgithub.com%2FSchlumberger%2FUOM?ref=badge_shield) |
| PyPI | [](https://pypi.org/project/uom/) [](https://pypi.org/project/uom/) [](https://badge.fury.io/py/uom) |
| PePy | [](https://pepy.tech/project/uom) [](https://pepy.tech/project/uom) [](https://pepy.tech/project/uom) |
| Code formatting | [](https://github.com/psf/black) |
<!--
## Build package
```sh
pip3 install wheel
python3 setup.py bdist_wheel
``` -->
## 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).
```sh
pip install uom
```
## Usage
Please find examples of possible utilization:
Find conversion factors to be applied to convert from one unit to another
```Python
from uom import conversion_factors
scale, offset = conversion_factors(source='m', target='ft')
```
Convert a value from one unit to another
```Python
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
```Python
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
[](https://app.fossa.com/projects/git%2Bgithub.com%2FSchlumberger%2FUOM?ref=badge_large)
Raw data
{
"_id": null,
"home_page": "http://github.com/schlumberger/UOM",
"name": "uom",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "uom unit measurement measure Energistics oilfield",
"author": "Velizar VESSELINOV",
"author_email": "vvesselinov@slb.com",
"download_url": "https://files.pythonhosted.org/packages/1c/cf/9f540aa541805f8477215ebef8f5cad0562ee410ce1d2f6940f902ebdc73/uom-0.6.3.tar.gz",
"platform": null,
"description": "# UOM\n\n## Static code analysis\n\n| Tools | Badges |\n| --- | --------------------------- |\n| Scrutinizer | [](https://scrutinizer-ci.com/g/Schlumberger/UOM/?branch=master) [](https://scrutinizer-ci.com/g/Schlumberger/UOM/?branch=master) [](https://scrutinizer-ci.com/g/Schlumberger/UOM/build-status/master) [](https://scrutinizer-ci.com/code-intelligence) |\n| Codacy | [](https://www.codacy.com/gh/Schlumberger/UOM/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Schlumberger/UOM&utm_campaign=Badge_Grade) |\n| Codecov | [](https://codecov.io/gh/Schlumberger/UOM) |\n| Coveralls | [](https://coveralls.io/github/Schlumberger/UOM?branch=master) |\n| CodeQL | [](https://github.com/Schlumberger/UOM/actions/workflows/codeql.yml) |\n| CircleCI | [](https://circleci.com/gh/Schlumberger/UOM/tree/master) |\n| TravisCI | [](https://travis-ci.com/Schlumberger/UOM) |\n| Fossa | [](https://app.fossa.com/projects/git%2Bgithub.com%2FSchlumberger%2FUOM?ref=badge_shield) |\n| PyPI | [](https://pypi.org/project/uom/) [](https://pypi.org/project/uom/) [](https://badge.fury.io/py/uom) |\n| PePy | [](https://pepy.tech/project/uom) [](https://pepy.tech/project/uom) [](https://pepy.tech/project/uom) |\n| Code formatting | [](https://github.com/psf/black) |\n\n<!--\n## Build package\n\n```sh\npip3 install wheel\npython3 setup.py bdist_wheel\n``` -->\n\n## Description\n\nPython unit of measure (UOM) conversion tool\n\nEnergistics UOM 1.0 (<https://www.energistics.org/energistics-unit-of-measure-standard/>)\nis the primary source of conversion factors and unit symbols.\nWe extended it with additional unit aliases and a \\\"unitless\\\" unit that\ndoesn't have any conversion.\n\nThe units are case-sensitive.\n\n## Where to get it\n\nThe source code is available on GitHub at: <https://github.com/Schlumberger/UOM>\n\nBinary installers for the latest released version are available at the Python\nPackage Index (PyPI).\n\n```sh\npip install uom\n```\n\n## Usage\n\nPlease find examples of possible utilization:\n\nFind conversion factors to be applied to convert from one unit to another\n\n```Python\nfrom uom import conversion_factors\n\nscale, offset = conversion_factors(source='m', target='ft')\n```\n\nConvert a value from one unit to another\n\n```Python\nfrom uom import convert\n\nprint(convert(value=10, source='m', target='ft'))\n```\n\nReturn the base SI (\n<https://en.wikipedia.org/wiki/International_System_of_Units>) unit.\nIf you are using unit alias you can find the compatible Energistics UOM symbol\n\n```Python\nfrom uom import base_unit, unit_alias\n\nprint(base_unit('kft.lbf'))\nprint(unit_alias('kft.lbf'))\n```\n\nIf you have suggestions for improvement or you found bugs,\nplease don't hesitate to put them on the issue list.\n\n## License\n\n[](https://app.fossa.com/projects/git%2Bgithub.com%2FSchlumberger%2FUOM?ref=badge_large)\n",
"bugtrack_url": null,
"license": "BSD 2-Clause \u201cSimplified\u201d License",
"summary": "Unit of Measure conversion tool",
"version": "0.6.3",
"project_urls": {
"Homepage": "http://github.com/schlumberger/UOM"
},
"split_keywords": [
"uom",
"unit",
"measurement",
"measure",
"energistics",
"oilfield"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "01af8f585abc0f78aede9cee440cb37284c06f3e55171fd6395b46f2c9193eae",
"md5": "54a1094ff0234131568d061b20e64b60",
"sha256": "8d65a375f0c2d8e2f98df61ac42e0d707d3b43f94fe65ea2dfbbebd62ce2499b"
},
"downloads": -1,
"filename": "uom-0.6.3-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "54a1094ff0234131568d061b20e64b60",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.6",
"size": 38056,
"upload_time": "2023-09-21T13:39:11",
"upload_time_iso_8601": "2023-09-21T13:39:11.125155Z",
"url": "https://files.pythonhosted.org/packages/01/af/8f585abc0f78aede9cee440cb37284c06f3e55171fd6395b46f2c9193eae/uom-0.6.3-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1ccf9f540aa541805f8477215ebef8f5cad0562ee410ce1d2f6940f902ebdc73",
"md5": "c875c20805649565910778a7c123be4a",
"sha256": "8851f793e92384de33026f1f7c74a5f453cc4e5e0873bbb1cd4adef592a0914b"
},
"downloads": -1,
"filename": "uom-0.6.3.tar.gz",
"has_sig": false,
"md5_digest": "c875c20805649565910778a7c123be4a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 39479,
"upload_time": "2023-09-21T13:39:13",
"upload_time_iso_8601": "2023-09-21T13:39:13.045926Z",
"url": "https://files.pythonhosted.org/packages/1c/cf/9f540aa541805f8477215ebef8f5cad0562ee410ce1d2f6940f902ebdc73/uom-0.6.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-21 13:39:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "schlumberger",
"github_project": "UOM",
"travis_ci": true,
"coveralls": true,
"github_actions": true,
"circle": true,
"requirements": [],
"lcname": "uom"
}