Skip to main content

Multi purpose unit conversion package

Project description

Maßlos unit conversion library

coverage version MIT License

Set of functions to convert between different units including metric and imperial

< Add an optional screenshot of your project below >

Table of Contents

Installation

On macOS and Linux:

$ python -m pip install masslos

On Windows:

PS> python -m pip install masslos

Execution / Usage

Here are a few examples of using the masslos library in your code:

from masslos import Distance, Speed, Weight
...
# without specifying the decimal digits (default = 2)
w = Weight()
s = Speed()
d = Distance()

dist_in_meter = d.convert(10, "yd", "m")
weight_in_kg = w.convert(11, "lbs", "kg")

print("Speed units:")
print(s.list_units())
# with specifying the decimal digits
w = Weight()
s = Speed()
d = Distance()

dist_in_meter = d.convert(value=10, from_unit="yd", to_unit="m", ndigits=3)
weight_in_kg = w.convert(value=11, from_unit="lbs", to_unit="kg", ndigits=3)

For more examples, please refer to the project's Wiki or documentation page.

Technologies

masslos uses the following technologies and tools:

Features

masslos currently has the following set of features:

  • Converting distances including
    • metric
    • imperial
    • astronomical
  • Converting weights including
    • metric
    • imperial
  • Converting speeds

Author

Andreas Haberl – # – develop@haberl-info.de

Change log

  • 0.2.2
    • fix: packaging
  • 0.2.1
    • feat: add Speed class
    • feat: changing to class based API
      BREAKING CHANGE: use instance methods instead of function calls
    • feat: add function "list_units"
    • test: updates
    • docs: update README.md
  • 0.2.0
    • feat: argument for precision of conversion
  • 0.1.0
    • First working version

License

masslos is distributed under the MIT license. See LICENSE for more details.

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

masslos-0.2.2.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

masslos-0.2.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file masslos-0.2.2.tar.gz.

File metadata

  • Download URL: masslos-0.2.2.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for masslos-0.2.2.tar.gz
Algorithm Hash digest
SHA256 3328f70dd3bd144d9ae0a200df219b16a5c7094bbd7cdfc8a8130dc39e17867f
MD5 4c984761cdafbbf30a9b72e50bdf83e9
BLAKE2b-256 ca6fd28e55a47cf6f1ab0f22f5913bf88eb8a0b45507fa168af5a8ae7f3e16ef

See more details on using hashes here.

File details

Details for the file masslos-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: masslos-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for masslos-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c82400416b1633df3c4bd793ffd0d0b4df8435cf44f85b6dab7220ee4ec8d787
MD5 dc7275412f10bf28734cc476d833716d
BLAKE2b-256 44996a1b55eac57e93db5fcc40fdb5d9949d0ed61029ac132d51ab88e75fefbc

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