This Package is used to calculate BMI and categorise the BMI in to 6 classes (i.e, Under Weight,Normal Weight,Over Weight,Moderately Obese,Severely Obese,Very Severely Obese) along with their health risks.
Python
- Written code to take input as json file and dump results in to a new json file
- Using Pytest for checking the functionality of methods for every update
- Using Github Actions to publish the package.
pip install bmi-batch-process
- import BodyMassIndex package
from BMI.bmi_processer import BodyMassIndex
- Create an object for the class
obj = BodyMassIndex()
- Input file example
# the input must be an iterable of json objects [ { "Gender":"Male", "HeightCm":171, "WeightKg":96 }, { "Gender":"Male", "HeightCm":161, "WeightKg":85 }, ... ]
Example:
processed_results = obj.process_start('input_file.json', 'output_path.json')
Counting No of OverWeight people can be done by the following
- import count_overweight function
from BMI.count_overweight import count_overweight
- give the processed records file as input
count_overweight('path of processed records') #prints the no of over weight people
GNU v3