wisefood-client
A small, robust Python client for accessing and populating the data infrastructure of the WiseFood platform.
The WiseFood platform exposes two distinct APIs, and this package ships one client for each:
DataClient— the WiseFood Data API: articles, artifacts, guides, guidelines, textbooks, textbook passages, and food-composition tables (FCTables).Client— the WiseFood API: households, members, and member profiles.
Install
pip install wisefood
Quickstart
import os
from wisefood import DataClient, Credentials
client = DataClient(
os.environ["WISEFOOD_API_URL"],
Credentials(username=os.environ["WISEFOOD_USERNAME"],
password=os.environ["WISEFOOD_PASSWORD"]),
)
article = client.articles["some-article-slug"]
print(article.title)
for hit in client.articles.search("mediterranean diet", limit=5):
print(hit.title)
Machine-to-machine auth uses client_id / client_secret instead of username/password.
Usage telemetry
The client reports which SDK operations you call, whether they succeeded and how long they took, so platform usage reports account for scripts and notebooks and not only the web app. It never sends your arguments, your results, or anything you passed in.
client.analytics.track("feature.used", app="catalog", feature="bulk-import")
client.feedback.submit(target_type="article", target_id=urn, rating="up",
comment="the extraction looks right")
print(client.analytics.session_id) # groups everything this client did
Turn it off with the environment variable or the constructor:
export WISEFOOD_TELEMETRY=0
client = Client(url, credentials, telemetry=False)
It is queued and sent on a background thread, so it never blocks or raises into
your code, and it switches itself off against a deployment whose gateway does
not accept it. client.analytics.flush() sends what is queued and keeps going;
close() stops it, and runs automatically at exit.
Documentation
Full docs (concepts, per-resource guides, API reference) live at https://wisefood-client.readthedocs.io.
License
See LICENSE.
Metadata
Release files for wisefood 0.0.42
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wisefood-0.0.42.tar.gz | 156.0 kB | Without provenance | Details for wisefood-0.0.42.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wisefood-0.0.42-py3-none-any.whl | Python 3 | none | any | Details for wisefood-0.0.42-py3-none-any.whl |
Total release size: 277.2 kB
Release files / wisefood-0.0.42.tar.gz
| Download URL | wisefood-0.0.42.tar.gz |
|---|---|
| Size | 156.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cff9f314b4b5277457e4dfa3bff3104d40e5a3e47659b13d1b68090c24892823
|
|
BLAKE2b-256 checksum How to use checksums |
0c7d7f31dd067beefc235a049d6c44ace28ac82e2b387e42a1d6befa813a2850
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Release files / wisefood-0.0.42-py3-none-any.whl
| Download URL | wisefood-0.0.42-py3-none-any.whl |
|---|---|
| Size | 121.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3039473292f802abd31476591f2350a436ed985dbadb958f7ecd92b90187a26c
|
|
BLAKE2b-256 checksum How to use checksums |
e84cb1d74ae0cc21b5c404a629868d41fb87edcc65fb256d496a12f976d213f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Security for wisefood 0.0.42
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.