Skip to main content

AnyUnit - Universal unit converter

Project description

AnyUnit - Universal unit converter

Python Version License: MIT

Simple and convenient library for converting physical units.

Installation

pip install anyunit

Examples

Convert length

from anyunit import convert_length

result = convert_length(1, "kilometer", "meter")
print(result) # 1000.0

Convert weight

from anyunit import convert_weight

result = convert_weight(1, "kilogram", "gram")
print(result) # 1000.0

Convert area

from anyunit import convert_area

result = convert_area(1, "kilometer", "mile")
print(result) # 0.38610215859253505

Get all units

from anyunit import getAllUnits

result = getAllUnits()
print(result) # {'LENGTH': ['meter', 'kilometer', ... ], 'WEIGHT': ['kilogram', 'gram', ... ], ...}

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

anyunit-0.1.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

anyunit-0.1.3-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file anyunit-0.1.3.tar.gz.

File metadata

  • Download URL: anyunit-0.1.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.10

File hashes

Hashes for anyunit-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5dbe333766012b3975adeede2609bd1a02623ae623ef4ab946de5d8abeadc1d4
MD5 ca4dc71ac43d71acba6cda9a687efb37
BLAKE2b-256 04e397eb521ef76e344684b102bdaad052514e97fa6420289be46b12bc888248

See more details on using hashes here.

File details

Details for the file anyunit-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: anyunit-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.10

File hashes

Hashes for anyunit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b06b4d7407b53b33b6637c7682e711b1ab60c0db00ae707f53ec6c67ee6b970e
MD5 f8cc7ea6bf4d0004cb07fda2bc756b4a
BLAKE2b-256 8a3414867013bf42906ebf0dce8a8d173532530d6fa16a6e86d1275bd5031e36

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