Skip to main content

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


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)

Uploaded Source

Built Distribution

fooddata-0.1.1-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page