converterpro

Python converter library


Keywords
weight-conversion, converter, oforiwaasam, open-source, python, school-project
License
Apache-2.0
Install
pip install converterpro==0.1.2

Documentation

ConverterPro

A python library to convert units and currencies

Hex.pm GitHub issues Build Status Coverage Status black poetry PyPI Deployment Documentation Status

🔭 Overview

This python library will allow developers to easily incorporate conversions into their programs without having to write all the logic for it. The library currently has the following functionalities:

📝 Features

  • Weight conversion between Metric, Imperial and US Systems of Measurement
    • Grams
    • Milligrams
    • Kilograms
    • Metric Tonnes
    • Imperial Tons
    • US tons
    • Pounds
    • Ounces

🛠️ Installation

converterpro can be found on PyPi and hence can be installed with pip:

pip install converterpro

⛯ Basic Usage

>>> from converterpro import weight_converter
>>> my_gram = weight_converter.Gram(1.0)
>>> my_gram.convert_to_kilograms()
0.001

📝 Details

This library project is a pure python project using modern tooling. It uses a Makefile as a command registry, with the following commands:

  • make: list available commands
  • make install: install and build this library and its dependencies using poetry
  • make lint: perform static analysis of this library with ruff and black
  • make format: autoformat this library using black and ruff
  • make test: run automated tests with pytest
  • make coverage: run automated tests with pytest and collect coverage information

👩🏾‍💻👨🏾‍💻 Contributing

Please see CONTRIBUTING for more information.

🪪 License

This software is licensed under the Apache 2.0 license. Please see LICENSE for more information.

🙎🏾‍ Author

Main Maintainer: Lily Sam