# UOM
## Static code analysis
| Tools | Badges |
| --- | --------------------------- |
| Scrutinizer | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Schlumberger/UOM/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Schlumberger/UOM/?branch=master) [![Code Coverage](https://scrutinizer-ci.com/g/Schlumberger/UOM/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Schlumberger/UOM/?branch=master) [![Build Status](https://scrutinizer-ci.com/g/Schlumberger/UOM/badges/build.png?b=master)](https://scrutinizer-ci.com/g/Schlumberger/UOM/build-status/master) [![Code Intelligence Status](https://scrutinizer-ci.com/g/Schlumberger/UOM/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence) |
| Codacy | [![Codacy Badge](https://app.codacy.com/project/badge/Grade/f2c1140afacf439c8fec00194acdc7db)](https://www.codacy.com/gh/Schlumberger/UOM/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Schlumberger/UOM&utm_campaign=Badge_Grade) |
| Codecov | [![codecov](https://codecov.io/gh/Schlumberger/UOM/branch/master/graph/badge.svg?token=mUH2Yzsxmd)](https://codecov.io/gh/Schlumberger/UOM) |
| Coveralls | [![Coverage Status](https://coveralls.io/repos/github/Schlumberger/UOM/badge.svg?branch=master)](https://coveralls.io/github/Schlumberger/UOM?branch=master) |
| CodeQL | [![CodeQL](https://github.com/Schlumberger/UOM/actions/workflows/codeql.yml/badge.svg)](https://github.com/Schlumberger/UOM/actions/workflows/codeql.yml) |
| CircleCI | [![CircleCI](https://circleci.com/gh/Schlumberger/UOM/tree/master.svg?style=svg)](https://circleci.com/gh/Schlumberger/UOM/tree/master) |
| TravisCI | [![Build Status](https://travis-ci.com/Schlumberger/UOM.svg?token=qgnSxUFcykzzPyjostSM&branch=master)](https://travis-ci.com/Schlumberger/UOM) |
| Fossa | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSchlumberger%2FUOM.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FSchlumberger%2FUOM?ref=badge_shield) |
| PyPI | [![PyPI Latest Release](https://img.shields.io/pypi/v/uom.svg)](https://pypi.org/project/uom/) [![Package Status](https://img.shields.io/pypi/status/uom.svg)](https://pypi.org/project/uom/) [![Python](https://img.shields.io/pypi/pyversions/uom.svg?style=plastic)](https://badge.fury.io/py/uom) |
| PePy | [![Downloads](https://pepy.tech/badge/uom)](https://pepy.tech/project/uom) [![Downloads](https://pepy.tech/badge/uom/month)](https://pepy.tech/project/uom) [![Downloads](https://pepy.tech/badge/uom/week)](https://pepy.tech/project/uom) |
| Code formatting | [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](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
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSchlumberger%2FUOM.svg?type=large)](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 | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Schlumberger/UOM/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Schlumberger/UOM/?branch=master) [![Code Coverage](https://scrutinizer-ci.com/g/Schlumberger/UOM/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Schlumberger/UOM/?branch=master) [![Build Status](https://scrutinizer-ci.com/g/Schlumberger/UOM/badges/build.png?b=master)](https://scrutinizer-ci.com/g/Schlumberger/UOM/build-status/master) [![Code Intelligence Status](https://scrutinizer-ci.com/g/Schlumberger/UOM/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence) |\n| Codacy | [![Codacy Badge](https://app.codacy.com/project/badge/Grade/f2c1140afacf439c8fec00194acdc7db)](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 | [![codecov](https://codecov.io/gh/Schlumberger/UOM/branch/master/graph/badge.svg?token=mUH2Yzsxmd)](https://codecov.io/gh/Schlumberger/UOM) |\n| Coveralls | [![Coverage Status](https://coveralls.io/repos/github/Schlumberger/UOM/badge.svg?branch=master)](https://coveralls.io/github/Schlumberger/UOM?branch=master) |\n| CodeQL | [![CodeQL](https://github.com/Schlumberger/UOM/actions/workflows/codeql.yml/badge.svg)](https://github.com/Schlumberger/UOM/actions/workflows/codeql.yml) |\n| CircleCI | [![CircleCI](https://circleci.com/gh/Schlumberger/UOM/tree/master.svg?style=svg)](https://circleci.com/gh/Schlumberger/UOM/tree/master) |\n| TravisCI | [![Build Status](https://travis-ci.com/Schlumberger/UOM.svg?token=qgnSxUFcykzzPyjostSM&branch=master)](https://travis-ci.com/Schlumberger/UOM) |\n| Fossa | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSchlumberger%2FUOM.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FSchlumberger%2FUOM?ref=badge_shield) |\n| PyPI | [![PyPI Latest Release](https://img.shields.io/pypi/v/uom.svg)](https://pypi.org/project/uom/) [![Package Status](https://img.shields.io/pypi/status/uom.svg)](https://pypi.org/project/uom/) [![Python](https://img.shields.io/pypi/pyversions/uom.svg?style=plastic)](https://badge.fury.io/py/uom) |\n| PePy | [![Downloads](https://pepy.tech/badge/uom)](https://pepy.tech/project/uom) [![Downloads](https://pepy.tech/badge/uom/month)](https://pepy.tech/project/uom) [![Downloads](https://pepy.tech/badge/uom/week)](https://pepy.tech/project/uom) |\n| Code formatting | [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](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[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSchlumberger%2FUOM.svg?type=large)](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"
}