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.
python-usda/README.rst

916 B

python-usda

⚠️ Since October 1, 2019, the APIs this package relies on have been deprecated. python-usda 1.x will remove those APIs and rely on the new Food Data Central APIs.

python-usda is a fork of pygov focused on USDA's Food Composition Database API. Have a look at the documentation!

Setup

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)