A Simple temperature conversion library for Python 3.
This package is available for download on PyPi
python3 -m pip install temperaturepy
Easy Conversions
>> from temperature import Temperature
>> celsius: int = 25
>> kelvin: Temperature = Temperature.ctok(celsius)
>> kelvin
298.15
Simple maths and comparisons built in
>> from temperature import Temperature
>> start_temp: Temperature = Temperature(150)
>> end_temp: Temperature = Temperature(100)
>> delta_t = start_temp - end_temp
>> delta_t
Temperature(kelvin=50, celsius=-223.15, farenheit=-369.67, rankine=90.0)
Clamped to real bounds
>> from temperature import Temperature
>> impossible = Temperature(-1)
ValueError: Temperature cannot be below Absolute Zero
For more examples, please see the examples folder.
This project is released under the MIT license