Skip to main content

This package is used to process BMI (BodyMassIndex) using Height and Weight of person. The input must a iterable of json objects

Project description

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

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

bmi_batch_process-0.3.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

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

bmi_batch_process-0.3-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file bmi_batch_process-0.3.tar.gz.

File metadata

  • Download URL: bmi_batch_process-0.3.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for bmi_batch_process-0.3.tar.gz
Algorithm Hash digest
SHA256 1c016f46c921faccfba3f1e8f14348ab2c76158e640580cb26fffc679abfb59b
MD5 6e99e33cc18ffe74a3bd4ccfe4d05526
BLAKE2b-256 11eef512e217409d746d86af04e02970dde703330c3b55f336c80dfba324636b

See more details on using hashes here.

File details

Details for the file bmi_batch_process-0.3-py3-none-any.whl.

File metadata

  • Download URL: bmi_batch_process-0.3-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for bmi_batch_process-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8edf9f42ff24a7e9395a175ec4d5e5e82703d79b0cd11bdbd2d01c1da5a36c21
MD5 5a59bd7980ea35873dda0c2d916b7e22
BLAKE2b-256 e5c90603c501fd7ee84660a37d9a5813cff496c6e35069d7126d18f6e2d05338

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