What is Health Information API?
A FastAPI application that provides health and nutrition calculators including BMI, body frame size, body fat percentage, macronutrient targets, and food nutrition via the USDA FoodData Central API. It is designed for developers who want to integrate these health metrics into their applications.
How to use Health Information API?
Clone the repository, install dependencies with pip install -r requirements.txt, set the USDA_API_KEY environment variable (and optionally OPENAI_API_KEY), then run uvicorn main:app --reload. The API will be available at http://localhost:8000 with interactive documentation at /docs and /redoc.
Key features of Health Information API
- BMI Calculator
- Body Frame Size Calculator
- Body Fat Percentage Calculator (U.S. Navy Method)
- Macronutrient Calculator
- Food Nutrition Calculator (USDA FoodData Central API)
Use cases of Health Information API
- Calculate BMI from weight and height for health assessments.
- Determine body frame size based on wrist circumference and height.
- Estimate body fat percentage using the U.S. Navy method.
- Compute daily calorie and macronutrient targets based on personal data and goals.
- Look up the nutritional content of food ingredients using the USDA database.
评论