USDA Food Data Central (FDC) Python Client

A comprehensive Python library for interacting with the USDA Food Data Central API, designed for easy integration with Django applications and local database caching.

Documentation Status PyPI version Python Versions License

Key Features

  • Complete API Coverage: Access all endpoints of the USDA FoodData Central API

  • Object-Oriented Interface: Work with food data using intuitive Python objects

  • Django Integration: Seamlessly integrate with Django applications

  • Local Database Caching: Cache API responses for improved performance

  • Command-Line Interface: Quick access to food data from the terminal

  • Comprehensive Data Models: Structured models for all FDC data types

  • Unit Conversion: Convert between different food measurement units

  • Batch Operations: Efficiently process multiple food items

  • Nutrient Analysis: Analyze nutrient content and compare to dietary reference intakes

  • Recipe Analysis: Calculate nutritional information for recipes

Installation

pip install usda-fdc

Or install from source:

git clone https://github.com/mcgarrah/usda_fdc_python
cd usda_fdc_python
pip install -e .

Contents

Indices and tables