Giter Club home page Giter Club logo

uom's Introduction

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
PyPI PyPI Latest Release Package Status Python

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.

uom's People

Contributors

valerianslb avatar velizarvesselinov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.