Skip to main content

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 units
  • pyunitconverter.length: conversion of length units
  • pyunitconverter.mass: conversion of mass units
  • pyunitconverter.prefixes: prefixes for units of the International System (ie: kilo, mega, ...)
  • pyunitconverter.speed: conversion of speed units
  • pyunitconverter.temperature: conversion of temperature units
  • pyunitconverter.time: conversion of time units
  • pyunitconverter.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


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 details)

Uploaded Source

Built Distribution

pyunitconverter-0.5.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file pyunitconverter-0.5.1.tar.gz.

File metadata

  • Download URL: pyunitconverter-0.5.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.11.9 Linux/6.5.0-26-generic

File hashes

Hashes for pyunitconverter-0.5.1.tar.gz
Algorithm Hash digest
SHA256 5b5006f3f9146c891b50e6693274edf88e8692a6cfe2702161753b293cd31b44
MD5 577d1ae469cb2453d482dd1d5fd34fb5
BLAKE2b-256 6da8030be88cf59b8aa2da93d1e347d830314fd6aa4f610c951046bedd23a71a

See more details on using hashes here.

File details

Details for the file pyunitconverter-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: pyunitconverter-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.11.9 Linux/6.5.0-26-generic

File hashes

Hashes for pyunitconverter-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa0d176f4ac9aa792e35b6b75e2e2720a8595c21dcff6754d89d79c75e691986
MD5 5d05455e268762a78489092a9e22ae45
BLAKE2b-256 e25bc57e93fbf30347165dda6f5a977e1afc318ddd4c06e9f7e28c0c65497152

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page