Installation

The WiseFood client is a small, dependency-light Python package distributed on PyPI.

Requirements

  • Python ≥ 3.8 (the documentation and CI builds run on Python 3.13).

  • Runtime dependencies, installed automatically:

    • requests — the underlying HTTP layer.

    • pandas — powers the tabular entity.show() helper.

Install from PyPI

pip install wisefood

This gives you both clients:

from wisefood import DataClient, Client, Credentials
  • DataClient talks to the WiseFood Data API (articles, artifacts, guides, guidelines, textbooks, textbook passages, FCTables).

  • Client talks to the WiseFood API (households, members, profiles).

Optional: nicer interactive experience

If you work in IPython or Jupyter, install it to get tab-completion of entity slugs inside collection proxies (see Collections):

pip install ipython
client.articles["med<TAB>"   # completes to known article slugs

Development install

To work on the client or build the documentation locally, install the package in editable mode together with the docs extra:

git clone https://github.com/wisefood/wisefood-client
cd wisefood-client
python -m venv .venv && source .venv/bin/activate
pip install -e ".[docs]"

Run the test suite with:

pytest

Build the docs with:

sphinx-build -W -b html docs docs/_build/html

See Contributing for the full workflow.

Note

Every example in this documentation reads credentials and base URLs from environment variables (WISEFOOD_API_URL, WISEFOOD_USERNAME, WISEFOOD_PASSWORD, and for machine-to-machine auth WISEFOOD_CLIENT_ID / WISEFOOD_CLIENT_SECRET) and uses placeholder hosts such as https://data.wisefood.example. Never hard-code real secrets. See Authentication.