Skip to content

jagadeesh-r1/BMI-Processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

code-20210626-jagadeeshreddy

Body Mass Index Batch Processor

made-with-python

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.

Development

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.

Installation

pip install bmi-batch-process

Usage

  • 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')   

Task 2

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

License

GNU v3

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages