Skip to main content

A simple unit converter package for length, temperature, weight, and volume conversions

Project description

Unit Converter

Unit Converter is a simple Python package that allows you to convert between various units of length, temperature, weight, and volume. This package provides straightforward functions to handle common unit conversions with ease.

Features

  • Length Conversions

    • Meters to Feet and Feet to Meters
    • Kilometers to Miles and Miles to Kilometers
    • Centimeters to Inches and Inches to Centimeters
    • Millimeters to Inches and Inches to Millimeters
  • Temperature Conversions

    • Celsius to Fahrenheit and Fahrenheit to Celsius
    • Celsius to Kelvin and Kelvin to Celsius
  • Weight Conversions

    • Kilograms to Pounds and Pounds to Kilograms
    • Grams to Ounces and Ounces to Grams
    • Stones to Kilograms and Kilograms to Stones
  • Volume Conversions

    • Liters to Gallons and Gallons to Liters
    • Milliliters to Ounces and Ounces to Milliliters
    • Cups to Liters and Liters to Cups

Installation

You can install the package using pip:

pip install unit_ease


>>> from unit_ease import (
    meters_to_feet, feet_to_meters,
    kilometers_to_miles, miles_to_kilometers,
    centimeters_to_inches, inches_to_centimeters,
    millimeters_to_inches, inches_to_millimeters,
    celsius_to_fahrenheit, fahrenheit_to_celsius,
    celsius_to_kelvin, kelvin_to_celsius,
    kilograms_to_pounds, pounds_to_kilograms,
    grams_to_ounces, ounces_to_grams,
    stones_to_kilograms, kilograms_to_stones,
    liters_to_gallons, gallons_to_liters,
    milliliters_to_ounces, ounces_to_milliliters,
    cups_to_liters, liters_to_cups
 )

# Length Conversions
>>> print(f"10 meters is {meters_to_feet(10)} feet.")
>>> print(f"5 miles is {miles_to_kilometers(5)} kilometers.")

# Temperature Conversions
>>> print(f"25 Celsius is {celsius_to_fahrenheit(25)} Fahrenheit.")
>>> print(f"300 Kelvin is {kelvin_to_celsius(300)} Celsius.")

# Weight Conversions
>>> print(f"70 kilograms is {kilograms_to_pounds(70)} pounds.")
>>> print(f"5 grams is {grams_to_ounces(5)} ounces.")

# Volume Conversions
>>> print(f"2 liters is {liters_to_gallons(2)} gallons.")
>>> print(f"100 milliliters is {milliliters_to_ounces(100)} ounces.")

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

unit_ease-0.1.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file unit_ease-0.1.tar.gz.

File metadata

  • Download URL: unit_ease-0.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for unit_ease-0.1.tar.gz
Algorithm Hash digest
SHA256 288084026eb92bdd49e93ebc16bff0eb725d33fdc5a011a1257c4abd76e69bb5
MD5 f70abcfb08a67a1ec407cef267eab7cb
BLAKE2b-256 01bdfe5fce1692954a47dfb555d2a9286f1d879eaf71a659769768bd86e003da

See more details on using hashes here.

Supported by

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