This tutorial will guide you through creating a classic marinara sauce using TomatoPy. We'll cover everything from ingredient selection to final taste testing.
Prerequisites
Before starting, make sure you have:
Basic understanding of Python
TomatoPy installed
Virtual environment set up
Step 1: Setting Up Your Kitchen
First, let's initialize our virtual kitchen and configure the equipment:
from tomatopy import Kitchen, KitchenHardware# Initialize kitchenkitchen =Kitchen()# Set up hardwarehardware =KitchenHardware()stove = hardware.get_stove()blender = hardware.get_blender()# Configure stovestove.configure( burners={1: {"temperature": 100, "size": "medium"}, # For simmering2: {"temperature": 200, "size": "large"} # For initial cooking })
Step 2: Preparing Ingredients
Let's create our ingredients with optimal properties:
Based on our analysis, we can make adjustments if needed:
# If too acidic, add a pinch of sugar
if profile.acidity > 0.7:
final_sauce = kitchen.adjust(
final_sauce,
ingredient="sugar",
amount=5, # grams
method="stir"
)
# If too thick, add some water
if texture.consistency > 0.8:
final_sauce = kitchen.adjust(
final_sauce,
ingredient="water",
amount=50, # ml
method="stir"
)
Step 7: Final Quality Check
Let's perform a final quality assessment:
# Get comprehensive quality report
quality_report = tester.assess_quality(final_sauce)
# Print quality metrics
print(f"Overall quality: {quality_report.overall_score}")
print(f"Balance score: {quality_report.balance_score}")
print(f"Texture score: {quality_report.texture_score}")
# Get recommendations
print("Recommendations:")
for rec in quality_report.recommendations:
print(f"- {rec}")