Metadata-Version: 2.1
Name: uom
Version: 0.5.2
Summary: Unit of Measure conversion tool
Home-page: http://github.com/schlumberger/UOM
Author: Velizar VESSELINOV
Author-email: vvesselinov@slb.com
License: MIT
Keywords: uom unit measurement measure energistics oilfield
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Customer Service
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Dist: pandas


UOM
===


.. image:: https://app.codacy.com/project/badge/Grade/f2c1140afacf439c8fec00194acdc7db
   :target: https://www.codacy.com/gh/Schlumberger/UOM/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Schlumberger/UOM&amp;utm_campaign=Badge_Grade
   :alt: Codacy Badge


.. image:: https://scrutinizer-ci.com/g/Schlumberger/UOM/badges/quality-score.png?b=master
   :target: https://scrutinizer-ci.com/g/Schlumberger/UOM/?branch=master
   :alt: Scrutinizer Code Quality


.. image:: https://travis-ci.com/Schlumberger/UOM.svg?token=qgnSxUFcykzzPyjostSM&branch=master
   :target: https://travis-ci.com/Schlumberger/UOM
   :alt: Build Status


.. image:: https://github.com/Schlumberger/UOM/actions/workflows/codeql-analysis.yml/badge.svg
   :target: https://github.com/Schlumberger/UOM/actions/workflows/codeql-analysis.yml
   :alt: CodeQL


.. image:: https://circleci.com/gh/Schlumberger/UOM/tree/master.svg?style=svg
   :target: https://circleci.com/gh/Schlumberger/UOM/tree/master
   :alt: CircleCI


.. image:: https://coveralls.io/repos/github/Schlumberger/UOM/badge.svg?branch=master
   :target: https://coveralls.io/github/Schlumberger/UOM?branch=master
   :alt: Coverage Status




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

.. code-block::

   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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block::

   from uom import conversion_factors

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

Convert a value from one unit to another
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block::

   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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block::

   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.


