Recipe Database
Hint
Use recipe_db to interact with the Database if you want
- recipe_db: tools.recipe_db.RecipeDB
This contain a loaded class from RecipeDB Use this to reduce loading time
- class tools.recipe_db.RecipeDB(json_path)
Class to interact with the
data/recipeitems.json
and filter the data- static filter_cooktime(user_pd_frame: pandas.DataFrame, total_time: timedelta)
Filter the given DataFrame for the whole cooktime (cookTime+prepTime). Only return the recipes with less-equal time
- Parameters
user_pd_frame (pandas.DataFrame) – DataFrame to filter
total_time (datetime.timedelta) – Max cooktime
- Returns
DataFrame of booleans
- Return type
pandas.DataFrame
- static filter_keyword(user_pd_frame: pandas.DataFrame, keyword: str)
Filter the given DataFrame if the keyword is one of the columns name, description or recipeInstrucions
- Parameters
user_pd_frame (pandas.DataFrame) – DataFrame to filter
keyword (str) – The keyword to find
- Returns
DataFrame of booleans
- Return type
pandas.DataFrame