Library of Python functions to converts units
Project description
pyunitconverter
Description
pyunitconverter
is a Python library of functions for unit conversions.
Modules
pyunitconverter.energy
: conversion of energy unitspyunitconverter.length
: conversion of length unitspyunitconverter.mass
: conversion of mass unitspyunitconverter.prefixes
: prefixes for units of the International System (ie: kilo, mega, ...)pyunitconverter.speed
: conversion of speed unitspyunitconverter.temperature
: conversion of temperature unitspyunitconverter.time
: conversion of time unitspyunitconverter.volume
: conversion of volume units
Installation
python -m pip install pyunitconverter
Usage
Example 1
from pyunitconverter.mass import ounces_to_kilograms
mass = 10
print(f"{mass} ounces = {ounces_to_kilograms(mass)} kg")
Example 2
from pyunitconverter.prefixes import PREFIX_KILO
length = 5.2
print(f"{length} km = {PREFIX_KILO*length} m")
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
pyunitconverter-0.5.1.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for pyunitconverter-0.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa0d176f4ac9aa792e35b6b75e2e2720a8595c21dcff6754d89d79c75e691986 |
|
MD5 | 5d05455e268762a78489092a9e22ae45 |
|
BLAKE2b-256 | e25bc57e93fbf30347165dda6f5a977e1afc318ddd4c06e9f7e28c0c65497152 |