Download, build, and query the USDA food database
Project description
fooddata
Download, build, and query the USDA food database.
Do you know what you are putting in your body?
Installation
$ pip install fooddata --upgrade
Usage
$ fooddata build
$ fooddata query "SELECT * from foods WHERE category_id IS NOT NULL LIMIT 100;" --json | jq .
$ fooddata query "SELECT * from foods WHERE category_id IS NOT NULL LIMIT 100;" --json > output2.json
$ fooddata query "SELECT * from food_nutrients_v WHERE food_type IS NOT NULL AND food_category IS NOT NULL LIMIT 1000;" --json | jq .
Update Database
To update the database, just run the first command again:
$ fooddata build
Note
The data comes from the USDA website: https://fdc.nal.usda.gov/download-datasets.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fooddata-0.1.1.tar.gz
(4.3 kB
view hashes)