A simple script to get nutrient info from Food Data Central by FDC IDs
-
Clone the repo with
git clone https://github.com/jungkyuk/fdc-grabber.git
-
Copy and paste your API key in foodcodes.py
FDC_API_KEY = '<YOUR_API_KEY_HERE>'
-
Create a virtual environment:
python -m venv .venv
-
Activate the venv
Windows:.venv/Scripts/activate
Mac:source .venv/bin/activate
-
Install requirements
pip install -r requirements.txt
Run with python foodcodes.py <fdcID>