AnyUnit - Universal unit converter
Project description
AnyUnit - Universal unit converter
Simple and convenient library for converting physical units.
Installation
pip install anyunit
Examples
Convert length
from anyunit import convert_length
result = convert_length(1, "kilometer", "meter")
print(result) # 1000.0
Convert weight
from anyunit import convert_weight
result = convert_weight(1, "kilogram", "gram")
print(result) # 1000.0
Convert area
from anyunit import convert_area
result = convert_area(1, "kilometer", "mile")
print(result) # 0.38610215859253505
Get all units
from anyunit import getAllUnits
result = getAllUnits()
print(result) # {'LENGTH': ['meter', 'kilometer', ... ], 'WEIGHT': ['kilogram', 'gram', ... ], ...}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
anyunit-0.1.3.tar.gz
(3.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anyunit-0.1.3.tar.gz.
File metadata
- Download URL: anyunit-0.1.3.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dbe333766012b3975adeede2609bd1a02623ae623ef4ab946de5d8abeadc1d4
|
|
| MD5 |
ca4dc71ac43d71acba6cda9a687efb37
|
|
| BLAKE2b-256 |
04e397eb521ef76e344684b102bdaad052514e97fa6420289be46b12bc888248
|
File details
Details for the file anyunit-0.1.3-py3-none-any.whl.
File metadata
- Download URL: anyunit-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b06b4d7407b53b33b6637c7682e711b1ab60c0db00ae707f53ec6c67ee6b970e
|
|
| MD5 |
f8cc7ea6bf4d0004cb07fda2bc756b4a
|
|
| BLAKE2b-256 |
8a3414867013bf42906ebf0dce8a8d173532530d6fa16a6e86d1275bd5031e36
|