Skip to main content

A small client for accessing and managing resources in the WiseFood platform.

Project description

wisefood-client

PyPI version Python versions Documentation Status License

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.

Documentation

Full docs (concepts, per-resource guides, API reference) live at https://wisefood-client.readthedocs.io.

License

See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wisefood-0.0.23.tar.gz (46.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wisefood-0.0.23-py3-none-any.whl (43.7 kB view details)

Uploaded Python 3

File details

Details for the file wisefood-0.0.23.tar.gz.

File metadata

  • Download URL: wisefood-0.0.23.tar.gz
  • Upload date:
  • Size: 46.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for wisefood-0.0.23.tar.gz
Algorithm Hash digest
SHA256 2b1c20c28130fa54defe3696e9be6082a21d628762c4ee129648eae6bb6e0a7b
MD5 21a5b5625cba94503cb66a70cda31233
BLAKE2b-256 afcf5cdbc6cf2421c32a90f2bd95fe4797e9bb003ab6f04ee65c5ce0c759e7f0

See more details on using hashes here.

File details

Details for the file wisefood-0.0.23-py3-none-any.whl.

File metadata

  • Download URL: wisefood-0.0.23-py3-none-any.whl
  • Upload date:
  • Size: 43.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for wisefood-0.0.23-py3-none-any.whl
Algorithm Hash digest
SHA256 b3b17adf651318daefd23e62cd8ebef4946a1902e825c46f9f31388817dca368
MD5 ae4937551f6591435b2d3d5052de3ac7
BLAKE2b-256 4a8330654d4380f19c57360e13efacb9c5a3578f10f40dc724af9c3e7b3eeb45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page