Make conversions between various units
Project description
Unit Converter
Unit Converter is a simple python unit converter, that can help you convert various units.
For more information see the documentation Unit Converter Documentation.
Installation
You can install the Real Python Feed Reader from PyPI:
python -m pip install realpython-reader
The reader is supported on Python 3.11.0 and above.
How to use
Unit converter is a Python code package, named unitconverter.converter
. To use the package, first import it:
>>> from unitconverter import converter
You can then call various conversion modules:
>>> converter.convertLength(5, "cm", "m")
[0.05]
>>> converter.convertWeight(5, "kg", "g")
[5000.0]
>>> converter.convertEnergy(5, "kcal", "J")
[20920.0]
>>> converter.convertData(5, "Mb", "mb")
[40.0]
>>> converter.convertSpeed(5, "km/h", "m/s")
[1.38889]
>>> converter.convertVolume(5, "L", "ml")
[5000.0]
>>> converter.convertPressure(5, "psi", "bar")
[0.344738]
>>> converter.convertTime(5, "day", "h")
[120]
>>> converter.convertTemperature(5, "C", "K")
[278.15]
You can also import individual modules and use them to convert units:
>>> from unitconverter.converter import convertLength
>>> converter.convertLength(5, "cm", "m")
[0.05]
License
This package is licensed under the MIT license.
Release History
1.0.0
- Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file python-unitconverter-1.0.0.tar.gz
.
File metadata
- Download URL: python-unitconverter-1.0.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02bfc3b13fa526e68c87c734f05cf6d015910d7836b38cf3a65f65e8b487f8f1 |
|
MD5 | deaf2108d7c4af442ddf06d386da5a24 |
|
BLAKE2b-256 | 6efc5e53514e4f4d909f05fbbaf049ed9673263ad0b09ea22c9ea950b791d07b |
File details
Details for the file python_unitconverter-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: python_unitconverter-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77da12d436ccd25806d7fdc1695514d6c788b3bb2a92cd2fa02e69301081360e |
|
MD5 | 727d4f5de48949046d8625578ed48f07 |
|
BLAKE2b-256 | 73a7f6e6bb1a13f516fff40ec4682c3f5ddcbee329823732f2f3a9a5bf2f857e |