Skip to main content

Official Python SDK for the Food Tales Knowledge API

Project description

foodtales

Official Python SDK for the Food Tales Knowledge API.

Zero runtime dependencies (stdlib urllib only).

Install

pip install foodtales
# or
uv pip install foodtales
# or
poetry add foodtales

Quickstart

import os
from foodtales import FoodTalesClient, FoodTalesError

ft = FoodTalesClient(api_key=os.environ["FOODTALES_API_KEY"])

try:
    page = ft.search(q="biryani", limit=5, mode="lexical")
    print(page.data)
    print(page.credits)  # used / remaining / reset_at
except FoodTalesError as err:
    print(err.status, err.code, err.message)

Methods

Method Endpoint
search GET /v1/search
get_dish GET /v1/dishes/{ref}
dish_relationships GET /v1/dishes/{ref}/relationships
dish_ingredients GET /v1/dishes/{ref}/ingredients
dish_recipes GET /v1/dishes/{ref}/recipes
similar_dishes GET /v1/similar/dishes/{ref}
similar_recipes GET /v1/similar/recipes/{ref}
search_ingredients GET /v1/ingredients
get_ingredient GET /v1/ingredients/{id}
ingredient_recipes GET /v1/ingredients/{id}/recipes
coverage GET /v1/coverage/dishes
trust / browse / siblings public demo endpoints (no key)

Auth header: X-Api-Key.

Docs

Develop (contributors)

pip install ./sdk/python
python -m unittest discover -s sdk/python/tests -v

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

foodtales-0.1.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

foodtales-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file foodtales-0.1.0.tar.gz.

File metadata

  • Download URL: foodtales-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for foodtales-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2592f747cbec002a2f96a2a37b4e21d0b5882fab9be0d761cab638427b822fe2
MD5 fe616b35c46c13aa1875123d728d895a
BLAKE2b-256 b209bd01d201ccae082e3cd45ccb2e70b9f025305c6e53242f1028d4306814f8

See more details on using hashes here.

File details

Details for the file foodtales-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: foodtales-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for foodtales-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6c2d5369e501c2c028c8cfbce4a50fb7cadc0bbde2d135412da3fbfda19fac2
MD5 ddd887e50cacef9ec40d3fef5aa72a79
BLAKE2b-256 b026e4362d484b1245609e769f31b42422ff127ab00a75624e291a2d66873730

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