0 purchases
unitconverterpython 0.0.2
Unit Converter
This project is a simple unit converter.
In version 0.0.2 it will be possible to convert units related to distance, pressure, temperature, weight and the new torque and power units.
The package unit-converter-python is used to:
- Distance conversion:
- centimeter
- fathom
- feet
- inch
- kilometer
- meters
- mile
- yard
- Power conversion:
- horse power
- kilowatt
- metric horse power
- watt
- Pressure Conversion:
- atm
- bar
- kgf/m²
- pascal
- psi
- Temperature Conversion:
- Celsius
- Fahrenheit
- Kelvin
- Torque conversion:
- kgf.m
- lbf.ft
- lbf.in
- nm
- Weight Conversion:
- Gram
- Kilogram
- Ounce
- Pound
Installation
Use the package manager pip to install unit-converter-python
pip install unit_converter_python
Usage
This package can be used in applications where it is necessary to convert units of measurement.
Here we have an example of use converting a temperature measurement from Fahrenheit to Celsius.
Step 1
Import the desired package.
from unit_converter_python.temperature import fahrenheit_conversion_to
Step 2
Use the function to convert the value from Fahrenheit to Celsius.
Example:
fahrenheit_value = 62
converted_value = fahrenheit_conversion_to.f_to_c(fahrenheit_value)
print(f"The temperature of {fahrenheit_value}ºF was converted to {converted_value:.2F}ºC.")
Author
Daniel Torres de Andrade
License
MIT
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.