What is unitconv?
A units converter that understands a lot of written queries and produce a nice human response:
>>> import unitconv
>>> unitconv.convert("3 meters in cm")
'3 meters = 300 centimeters'
>>> unitconv.convert("1000 grams in kg")
'1000 grams = 1 kilogram'
>>> unitconv.convert("2 cups to l")
'2 US cups = 0.4732 litres'
>>> print unitconv.convert("300 yards")
300 yards = 274.32 meters
>>> unitconv.convert("34 days in weeks")
'34 days = 4.8571 weeks'
>>> unitconv.convert("45mg in ounces")
'45 milligrams = 0.0016 ounces'
>>> print unitconv.convert("300K in °f")
300K = 80.33°F
>>> unitconv.convert("50 cubic feet in m3")
'50 cubic feet = 1.4158 cubic meters'
>>> unitconv.convert("2 cups in l")
'2 US cups = 0.4732 litres'
>>> unitconv.convert("4 teaspoons")
'4 US teaspoons = 19.7157 millilitres'
You can also use it as a script:
$ unitconv 42 km to miles 42 kilometers = 26.0976 miles
Project’s history
Code here comes from other internal Canonical’s project, this part was opensourced in 2018:
I forked that to bring it to GitHub, migrate it to Python 3, shape it more like a project (have a setup.py, etc.), and do some releases.
Metadata
Release files for unitconv 1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| unitconv-1.tar.gz | 11.9 kB | Without provenance | Details for unitconv-1.tar.gz |
Release files / unitconv-1.tar.gz
| Download URL | unitconv-1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d09e8db3826556007d24daffd0dff35830a457c0f390ba7a844ca6ed95e35d99
|
|
BLAKE2b-256 checksum How to use checksums |
5d639cc9b213077bfca4a0e3d0ab5dbda5746cffbfffe2627617550f742e15bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9
|
Security for unitconv 1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.