A fork of pygov, refreshed and focused only on USDA NDB API
This repository has been archived on 2022-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Lucidiot 8abbea8160
Add doc8
2019-07-06 20:25:45 +02:00
docs Add doc8 2019-07-06 20:25:45 +02:00
usda Parse report types as enum 2019-04-26 08:45:43 +02:00
.codeclimate.yml Set up CodeClimate 2018-04-15 22:36:10 +02:00
.gitignore Add gitignore 2018-04-13 15:02:13 +02:00
.gitlab-ci.yml Add doc8 2019-07-06 20:25:45 +02:00
LICENSE Update LICENSE 2018-04-13 14:59:10 +02:00
README.md Fixes 2018-10-20 23:57:52 +02:00
VERSION Bump to 0.4.4 2019-04-26 06:48:41 +00:00
requirements-dev.txt Add doc8 2019-07-06 20:25:45 +02:00
requirements.txt Drop Python 3.3 support 2018-07-12 08:41:22 +02:00
setup.cfg Add doc8 2019-07-06 20:25:45 +02:00
setup.py Bump to 0.4.3 2019-04-04 18:11:49 +02:00

README.md

python-usda

python-usda is a fork of pygov focused on USDA's Food Composition Database API. Browse full documentation on Read the Docs

Installation

pip install python-usda

Usage

from usda.client import UsdaClient

client = UsdaClient("YOUR_API_KEY")
foods = client.list_foods(5)

for food in foods:
    print(food.name)

Result:

Abiyuch, raw
Acerola juice, raw
Acerola, (west indian cherry), raw
Acorn stew (Apache)
Agave, cooked (Southwest)