35dcbaba20 | ||
---|---|---|
docs | ||
usda | ||
.codeclimate.yml | ||
.gitignore | ||
.gitlab-ci.yml | ||
LICENSE | ||
README.rst | ||
VERSION | ||
requirements-dev.txt | ||
requirements.txt | ||
setup.cfg | ||
setup.py |
README.rst
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
= UsdaClient("YOUR_API_KEY")
client = client.list_foods(5)
foods
for food in foods:
print(food.name)
Result:
Abiyuch, raw
Acerola juice, raw
Acerola, (west indian cherry), raw
Acorn stew (Apache)
Agave, cooked (Southwest)