Skip to main content

A Python package designed for fetching information about recipes.

Project description

recipebox_pkg

A Python package designed for fetching information about recipes.

Installation

$ pip install recipebox_pkg

Features

  • Explore Recipe Details: Access comprehensive information about recipes through user queries.

  • Nutrition Insights: Retrieve detailed nutritional information tailored to specific dietary constraints.

  • Ingredient Details: Discover essential details about ingredients required for a recipe.

  • Visualize the Dish: View images showcasing the appearance of the prepared dish.

Usage

# Import the necessary function from recipebox_pkg
from recipebox_pkg import (fetch_recipe, id_search, ing_search, nutr_search)

# Replace the empty string with actual API key
api_key = 'your_actual_api_key'
# Use the fetch_recipe.search_recipes function to search for recipes 
recipes = fetch_recipe.search_recipes(api_key, 'pizza')

# Convert the retrieved recipes into a Pandas DataFrame
recipes_retrieved = fetch_recipe.convert_recipes(api_key, recipes)
# Define a list of ingredients you want to search for recipes
ingredients_list = ['beef', 'potato']

recipe_ingr = ing_search.ingredient_search_recipe(api_key, ingredients_list, number=5)

ingr_image = ing_search.display_images_ingredients(recipe_ingr)
# Define nutritional constraints using a dictionary
nutr_constraints = {'minProtein':'20', 'maxFat':'50' }

nutr_recipe = nutr_search.nutrient_search_recipe(api_key, nutr_constraints)

nutr_image = nutr_search.display_images_nutrient(nutr_recipe)
example_recipe_id = 123456
recipe = id_search.Recipe_id(pick_id, api_key)

# Retrieve information about the ingredients used in the recipe
ingredient_info = recipe.search_ingredient_id()

# Retrieve nutritional information for the recipe
nutr_info = recipe.search_nutrient_id()

# Retrieve information about the equipment required for the recipe
equipment_info = recipe.search_equipment_id()

# Retrieve raw instruction data for the recipe
raw_instruction = recipe.search_instruction_id()

# Convert the raw instruction data into a more usable format
instruction_info = recipe.convert_instruction(raw_instruction)
# List of recipe IDs for which you want to search for taste information
example_id_list = [123456, 987654]

# Retrieve taste information for the specified recipe IDs
taste = recipe.search_taste_id(id_list)

Dependencies

This package requires the following Python libraries:

  • Pandas
  • Requests

To install these libraries, run:

pip install pandas requests

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

recipebox_pkg was created by Yuchen An. It is licensed under the terms of the MIT license.

Credits

recipebox_pkg was created with cookiecutter and the py-pkgs-cookiecutter template.

Links

Documentation

Recipe-Food-Nutrition API Documentation

TestPyPI

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

recipebox_pkg-2.2.2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

recipebox_pkg-2.2.2-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file recipebox_pkg-2.2.2.tar.gz.

File metadata

  • Download URL: recipebox_pkg-2.2.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.0 Darwin/20.6.0

File hashes

Hashes for recipebox_pkg-2.2.2.tar.gz
Algorithm Hash digest
SHA256 dd1d91c31f380d34f7a631fe13c9922f277f01bbace3a587917beac3b1331c59
MD5 1c7ef783cf0b27778d01f94aaa9f43ff
BLAKE2b-256 438b8d719e9bf5e2030c799ab410d07df0631aa07fa35555b498e4d614405d50

See more details on using hashes here.

File details

Details for the file recipebox_pkg-2.2.2-py3-none-any.whl.

File metadata

  • Download URL: recipebox_pkg-2.2.2-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.0 Darwin/20.6.0

File hashes

Hashes for recipebox_pkg-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fb2fa9773f02edba22b82e6c2cc0e08c9f2475d1ea3a597d0757d922302c2604
MD5 7725527e1a3340356669983c30297118
BLAKE2b-256 26a71bab5f117fb96bacaa788359cc4c03050fceab81e7d62adbff82b04e4fb5

See more details on using hashes here.

Supported by

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