Skip to content

srcecde/locale-measurement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Locale Based Measurement Unit Conversion (Python)


A Python wrapper around measurement, quantities, babel, pytz, simple-date for conversion of Distance, Weight, Temperature, Volume, Area, Speed and Pressure.

Installation

pip3 install localemeasurement

How to USE

# unitConversion accepts 3 parameters
# Measurement Unit, locale, dict args
from localeconversion import unitConversion
  • DISTANCE
  from localeconversion import DISTANCE
  unitConversion(DISTANCE, 'hi_IN', **{"km": [1,2,3]})
  • WEIGHT
  from localeconversion import WEIGHT
  unitConversion(WEIGHT, 'hi_IN', **{"g": [1,2,3]})
  • TEMPERATURE
  from localeconversion import TEMPERATURE
  unitConversion(TEMPERATURE, 'hi_IN', **{"f": [1,2,3]})
  • VOLUME
  from localeconversion import VOLUME
  unitConversion(VOLUME, 'hi_IN', **{"l": [1,2,3]})
  • AREA
  from localeconversion import AREA
  unitConversion(AREA, 'hi_IN', **{"kPa": [1,2,3]})
  • SPEED
  from localeconversion import SPEED
  unitConversion(SPEED, 'hi_IN', **{km__hr: [1,2,3]})
  • PRESSURE
  from localeconversion import PRESSURE
  unitConversion(PRESSURE, 'hi_IN', **{"kPa": [1,2,3]}

The paramters that are passed in the dict args, should follow measurement standards.

For queries or issues, feel free to contact or open an issue

Releases

No releases published

Packages

No packages published

Languages