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.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fooddata-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 aa61d2e369b9a427b52cdcc39dd1d3e4496481f3d171dc7d0f99b0f37291ad76
MD5 ae3f0599751cae14daf3efd8848493cd
BLAKE2b-256 4a8fa67dd83e0d3648184f1c899fda7b9e9f1dae90e6b7740994f9ad4d112f48

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fooddata-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1fb39aa8e7b65594781c7d6998b96b5a07548a6297fcad19231b5321fcba60e9
MD5 c04bc2d7fb5279da707110eeeec4d550
BLAKE2b-256 c1eb0365f90392022639be61ab7c9499b063773686f1d1831024622776da7f4c

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