Skip to main content

Easy way of converting units.

Project description

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").

Example Usage

>>> from unit_convert import UnitConvert

# Yards + kilometres to miles
>>> UnitConvert(yards=136.23, kilometres=60).miles
37.3597678005

# Bytes to terabytes
>>> UnitConvert(b=19849347813875).tb
18.0528766704

# Nanometres to metres
>>> UnitConvert(nanometres=19849347813875).m
19849.3478139

Data, time, distance and mass are currently supported.

Project details


Release history Release notifications

This version

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for unit-convert, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size unit-convert-1.0.0.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page