Skip to main content

For Converting various units.

Project description

# # Unit Conversion Package

This Python package provides a collection of functions for unit conversions across different categories such as length, weight, time, data size, area, and volume. The package is designed to make it easy to convert values from one unit to another. To use the package, simply import the desired conversion functions from convertunit and utilize them in your code. For example:

# Installation Guide

On your terminal (Command Prompt) write the following command. pip install convertunit Hit Enter.

## Usage Guide

from convertunit import conv

x = 2000
a = conv.cm2m(x)
print(f'The answer is {a}m')

Project Link: https://github.com/Asylum0741/UnitConverter

Following is the list of all conversions in the package:

Length Conversions

  • cm to inches (cm2in)
  • inches to cm (in2cm)
  • cm to meters (cm2m)
  • meters to cm (m2cm)
  • meters to feet (m2ft)
  • feet to meters (ft2m)
  • km to miles (km2mi)
  • miles to km (mi2km)

Weight Conversions

  • kilograms to pounds (kg2lb)
  • pounds to kilograms (lb2kg)
  • grams to ounces (g2oz)
  • ounces to grams (oz2g)
  • grams to kilograms (g2kg)
  • kilograms to grams (kg2g)

Time Conversions

  • minutes to seconds (min2sec)
  • seconds to minutes (sec2min)
  • hours to minutes (hr2min)
  • minutes to hours (min2hr)
  • hours to seconds (hr2sec)
  • seconds to hours (sec2hr)
  • milliseconds to seconds (ms2sec)
  • seconds to milliseconds (sec2ms)
  • microseconds to seconds (us2sec)
  • seconds to microseconds (sec2us)
  • nanoseconds to seconds (ns2sec)
  • seconds to nanoseconds (sec2ns)
  • days to hours (days2hr)
  • hours to days (hr2days)
  • weeks to days (weeks2days)
  • days to weeks (days2weeks)
  • months to days (months2days)
  • days to months (days2months)
  • years to days (years2days)
  • days to years (days2years)

Data Size Conversions

  • bytes to kilobytes (B2KB)
  • kilobytes to bytes (KB2B)
  • bytes to megabytes (B2MB)
  • megabytes to bytes (MB2B)
  • bytes to gigabytes (B2GB)
  • gigabytes to bytes (GB2B)
  • kilobytes to megabytes (KB2MB)
  • megabytes to kilobytes (MB2KB)
  • kilobytes to gigabytes (KB2GB)
  • gigabytes to kilobytes (GB2KB)
  • megabytes to gigabytes (MB2GB)
  • gigabytes to megabytes (GB2MB)
  • bytes to terabytes (B2TB)
  • terabytes to bytes (TB2B)
  • kilobytes to terabytes (KB2TB)
  • terabytes to kilobytes (TB2KB)
  • megabytes to terabytes (MB2TB)
  • terabytes to megabytes (TB2MB)
  • gigabytes to terabytes (GB2TB)
  • terabytes to gigabytes (TB2GB)
  • petabytes to bytes (PB2B)
  • bytes to petabytes (B2PB)

Area Conversions

  • square meters to square feet (sqm2sqft)
  • square feet to square meters (sqft2sqm)
  • square meters to square centimeters (sqm2sqcm)
  • square centimeters to square meters (sqcm2sqm)

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

convertunit-1.0.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

convertunit-1.0.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file convertunit-1.0.1.tar.gz.

File metadata

  • Download URL: convertunit-1.0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for convertunit-1.0.1.tar.gz
Algorithm Hash digest
SHA256 dbd92b471f333317164d4e0cf96a146b87ccc56bf7e74ffee6808d2aba79d21a
MD5 d741bcecce398bd3b29dad1a1f803ce9
BLAKE2b-256 d47935edcca94e5bcb9f50290aacd854f47377152dcd95777a6bb3a6fe820548

See more details on using hashes here.

File details

Details for the file convertunit-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: convertunit-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for convertunit-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 72dd35d8930fca71fec3bc154994f61ad2435b9df29d6f2bfcbaa6b196b7bcfe
MD5 2d42c56e4229b28eb0379a7893c0ff3f
BLAKE2b-256 53e47add037be650f8305dd9cf5fe1e1d626ac3a8703b18e1d7f26e698959367

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