unit-convert
Easily convert units to different quantities.
For conveniance, abbreviations are accepted, where an attempt will be made to calculate the type based on the other inputs (eg. "m" can evaluate as either "minute" or "metre").
This library is deprecated: A recommendation is to use pint instead.
Example Usage
>>> from unit_convert import UnitConvert
# Yards + kilometres to miles
>>> UnitConvert(yards=136.23, kilometres=60)['miles']
37.35976780046479
# Bytes to terabytes
>>> UnitConvert('b', 19849347813875, 'megabytes', 512)['tb']
18.053364951617368
# List available conversions
>>> UnitConvert(metres=1).keys()
['nm', 'nanometres', 'μm', 'micrometres', 'mm', 'millimetres', 'cm', 'centimetres', 'i', 'inches', 'ft', 'feet', 'm', 'metres', 'meters', 'yd', 'yards', 'km', 'kilometres', 'kilometers', 'miles', 'lightyears', 'au', 'astronomical_units', 'parsec']
Data size, time, distance, mass and temperatures are supported.
Metadata
Release files for unit-convert 1.2.0
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 | |
|---|---|---|---|---|
| unit-convert-1.2.0.tar.gz | 5.7 kB | Without provenance | Details |
Release files / unit-convert-1.2.0.tar.gz
| Download URL | unit-convert-1.2.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9ba2af984a28f0bf55dfcb1f935eb9b6a0d9f94de650cf6b6b623f420802725
|
|
BLAKE2b-256 checksum How to use checksums |
030db19f969cf958cdaff72697cd6e89d5f6d03e396f5b06fa726cd44068d78d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for unit-convert 1.2.0
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.