Installation
Requirements
Python 3.8 or higher
requestslibrarypintlibrary (for unit conversions)python-dotenvlibrary (for loading environment variables)
Installing from PyPI
The recommended way to install the USDA FDC Python Client is from PyPI:
pip install usda-fdc
This will install the latest stable version of the package along with its dependencies and the fdc command line tool.
Installing from Source
You can also install the package directly from the source code:
git clone https://github.com/yourusername/usda_fdc.git
cd usda_fdc
pip install -e .
Development Installation
If you want to contribute to the development of the package, you can install it with development dependencies:
pip install -e ".[dev]"
Or using the requirements files:
pip install -r requirements-dev.txt
This will install additional packages needed for development and testing:
pytestfor running testspytest-covfor test coverageblackfor code formattingisortfor import sortingmypyfor type checkingflake8for linting
Django Integration
To use the Django integration features, install the package with Django dependencies:
pip install -e ".[django]"
Or using the requirements file:
pip install -r requirements-django.txt
Documentation Installation
To build the documentation locally, install the package with documentation dependencies:
pip install -e ".[docs]"
Or using the requirements file:
pip install -r requirements-docs.txt
Installing All Dependencies
To install all dependencies (development, Django, and documentation), use:
pip install -e ".[dev,django,docs]"
Or using the comprehensive requirements file:
pip install -r requirements-all.txt