Metadata-Version: 2.1
Name: fooddata
Version: 0.1.1
Summary: Download, build, and query the USDA food database
Home-page: https://github.com/mfdeux/fooddata
License: MIT
Author: Marc Ford
Author-email: mrfxyz567@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Requires-Dist: click (>=7.1.2,<8.0.0)
Requires-Dist: requests (>=2.24.0,<3.0.0)
Requires-Dist: tqdm (>=4.48.2,<5.0.0)
Project-URL: Repository, https://github.com/mfdeux/fooddata
Description-Content-Type: text/markdown

# fooddata

Download, build, and query the USDA food database.

Do you know what you are putting in your body?

## Installation

```shell script
$ pip install fooddata --upgrade
```

## Usage

```shell script
$ fooddata build
```

```shell script
$ fooddata query "SELECT * from foods WHERE category_id IS NOT NULL LIMIT 100;" --json | jq .
```

```shell script
$ fooddata query "SELECT * from foods WHERE category_id IS NOT NULL LIMIT 100;" --json > output2.json
```

```shell script
$ 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:

```shell script
$ fooddata build
```

## Note

The data comes from the USDA website:
[https://fdc.nal.usda.gov/download-datasets.html](https://fdc.nal.usda.gov/download-datasets.html)

