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
2018-04-14 12:48:30 +02:00
usda Fix non-standard method names, close #7 2018-04-14 12:48:30 +02:00
.gitignore Add gitignore 2018-04-13 15:02:13 +02:00
LICENSE Update LICENSE 2018-04-13 14:59:10 +02:00
README.md Add requires.io and landscape.io 2018-04-13 19:07:55 +02:00
setup.py Add requirement for enum backwards compatibility 2018-04-14 11:44:39 +02:00

python-usda

Code Health Requirements Status

python-usda is a fork of pygov focused on USDA's Food Composition Database API.

Installation

python-usda is in active development. When it will be listed on the Python Package Index, you will be able to install it using:

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)