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 f2ee88e356
Bump version number
2018-07-17 20:16:55 +02:00
usda Fix KeyError on search with empty results, close #20 2018-07-17 20:09:17 +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
.travis.yml Drop Python 3.3 support 2018-07-12 08:41:22 +02:00
LICENSE Update LICENSE 2018-04-13 14:59:10 +02:00
README.md Fix badges 2018-07-13 14:07:32 +02:00
requirements-dev.txt Use requirements.txt files 2018-07-10 08:52:19 +02:00
requirements.txt Drop Python 3.3 support 2018-07-12 08:41:22 +02:00
setup.py Bump version number 2018-07-17 20:16:55 +02:00

README.md

python-usda

License Python Package Format Supported Python versions Package status Requirements Status Maintainability Code Health Build Status Coverage Status GitHub last commit Gitter Badge count

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

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)