https://github.com/srcecde/locale-measurement
The package that convert the units based on loacale.
https://github.com/srcecde/locale-measurement
locale locale-conversion measurement-units python3
Last synced: 6 months ago
JSON representation
The package that convert the units based on loacale.
- Host: GitHub
- URL: https://github.com/srcecde/locale-measurement
- Owner: srcecde
- License: mit
- Created: 2017-11-25T17:58:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-04T06:53:39.000Z (over 8 years ago)
- Last Synced: 2025-09-28T11:37:03.940Z (10 months ago)
- Topics: locale, locale-conversion, measurement-units, python3
- Language: Python
- Homepage: http://localemeasurement.readthedocs.io/en/latest/
- Size: 13.7 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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