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
Metadata
Release files for recipebox_pkg 2.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| recipebox_pkg-2.2.2.tar.gz | 6.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| recipebox_pkg-2.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.9 kB
Release files / recipebox_pkg-2.2.2.tar.gz
| Download URL | recipebox_pkg-2.2.2.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd1d91c31f380d34f7a631fe13c9922f277f01bbace3a587917beac3b1331c59
|
|
BLAKE2b-256 checksum How to use checksums |
438b8d719e9bf5e2030c799ab410d07df0631aa07fa35555b498e4d614405d50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.11.0 Darwin/20.6.0
|
Release files / recipebox_pkg-2.2.2-py3-none-any.whl
| Download URL | recipebox_pkg-2.2.2-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb2fa9773f02edba22b82e6c2cc0e08c9f2475d1ea3a597d0757d922302c2604
|
|
BLAKE2b-256 checksum How to use checksums |
26a71bab5f117fb96bacaa788359cc4c03050fceab81e7d62adbff82b04e4fb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.11.0 Darwin/20.6.0
|