Skip to main content

Unit Conversion System

Project description

UnitCvrt

Unit Conversion System

Author

Shinsuke Sakai Yokohama National University

Installation

You can install the package via pip:

pip install UnitCvrt

License

This project is licensed under the MIT License - see the LICENSE file for details.

Simple usage

First, create an instance and check the registered unit names.

from UnitCvrt import UnitConv as uc
conv=uc.Convert()
conv.Registered()

Select a unit name from the list of registered units, then convert it using the following steps. The example below demonstrates how to convert 1 meter to inch for the case of length.

conv.SetUnit('Length')
conv.Eval('m','in',1)

You can output the unit conversion table using the following command. You can check the unit names from this output.

conv.Table()

Similarly, the unit conversion of density can be carried out according to the following steps.

conv.SetUnit('Density')
conv.Eval('N/m^3','kgf/mm^3',1)

Alternative method

from UnitCvrt import UnitConv as uc
lengh=uc.Length()
# Conversion Table
print(length.ShowDict())
print(length.Conv('m','in',1))
density=uc.Density()
# Conversion Table
print(density.ShowDict())
print(density.Conv('N/m^3','kgf/mm^3',1))

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

unitcvrt-0.1.4.tar.gz (5.5 kB view details)

Uploaded Source

File details

Details for the file unitcvrt-0.1.4.tar.gz.

File metadata

  • Download URL: unitcvrt-0.1.4.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.9

File hashes

Hashes for unitcvrt-0.1.4.tar.gz
Algorithm Hash digest
SHA256 44ed29eab958868003eaa2fdfd8b4c69129ea13537be52bed62f5566ab03cfc3
MD5 c161e56914fe9ffcec9e5951b1390857
BLAKE2b-256 a4e68beccbb24913e73c3b0fea87bcb81d878e2c29f5db43a4ed3a2a7b6d3145

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