Recipe Manager¶
Manage recipes — get details, check fulfillment, consume, and copy.
Access via grocy.recipes.
recipe = grocy.recipes.get(recipe_id=1)
print(f"{recipe.name}: {recipe.base_servings} servings")
# Check what's missing
fulfillment = grocy.recipes.fulfillment(recipe_id=1)
print(f"Fulfilled: {fulfillment.need_fulfilled}")
# Add missing ingredients to shopping list
grocy.recipes.add_not_fulfilled_to_shopping_list(recipe_id=1)
Class Reference¶
RecipeManager(api_client)
¶
Manage recipes and their fulfillment status.
Access via grocy.recipes.
get(recipe_id)
¶
Get a single recipe by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recipe_id
|
int
|
The Grocy recipe ID. |
required |
consume(recipe_id)
¶
Consume all ingredients of a recipe from stock.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recipe_id
|
int
|
The Grocy recipe ID. |
required |
fulfillment(recipe_id)
¶
Get the fulfillment status of a recipe.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recipe_id
|
int
|
The Grocy recipe ID. |
required |
all_fulfillment()
¶
Get the fulfillment status of all recipes.
copy(recipe_id)
¶
Create a copy of a recipe.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recipe_id
|
int
|
The Grocy recipe ID. |
required |
add_not_fulfilled_to_shopping_list(recipe_id)
¶
Add unfulfilled recipe ingredients to the shopping list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recipe_id
|
int
|
The Grocy recipe ID. |
required |