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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file fooddata-0.1.1.tar.gz.

File metadata

  • Download URL: fooddata-0.1.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Darwin/19.6.0

File hashes

Hashes for fooddata-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d540581072b1c6d25585e633dd90ea5c75bb8f021772a78fdc4e282ae181a767
MD5 8b8d3a2f923accb5db290fbed4f7f1af
BLAKE2b-256 512cba230a243598476c1b11bfce95c9bb1f808f0c7ae65cd67499c2f1c4cc68

See more details on using hashes here.

File details

Details for the file fooddata-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fooddata-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Darwin/19.6.0

File hashes

Hashes for fooddata-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d979a490840af788be2d0cd13ab5c9af6344ea2bff60fd7807dac19c2666a196
MD5 fc45dbe5f9bef63ed3f959e4d858cd96
BLAKE2b-256 37c6562b99acf71154450f4a7f6ee3230aeeb0033f8e841ffb0be79711011049

See more details on using hashes here.

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