🍕🔥 Pizza is great! 🔥🍕

Making Your First Marinara

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 kitchen
kitchen = Kitchen()

# Set up hardware
hardware = KitchenHardware()
stove = hardware.get_stove()
blender = hardware.get_blender()

# Configure stove
stove.configure(
    burners={
        1: {"temperature": 100, "size": "medium"},  # For simmering
        2: {"temperature": 200, "size": "large"}    # For initial cooking
    }
)

Step 2: Preparing Ingredients

Let's create our ingredients with optimal properties:

from tomatopy import Tomato, Garlic, Basil, OliveOil

# Create San Marzano tomatoes
tomatoes = Tomato(
    ripeness=0.9,
    variety="San Marzano",
    weight=800  # grams
)

# Create fresh garlic
garlic = Garlic(
    cloves=4,
    freshness=0.95,
    size="medium"
)

# Create fresh basil
basil = Basil(
    leaves=20,
    freshness=0.95,
    variety="Genovese"
)

# Create olive oil
olive_oil = OliveOil(
    amount=60,  # ml
    quality="extra_virgin",
    acidity=0.3  # %
)

Step 3: Creating the Recipe

Let's set up our recipe with proper proportions and cooking instructions:

from tomatopy import Recipe

# Create marinara recipe
marinara = Recipe("Classic Marinara")

# Add ingredients
marinara.add_ingredient(tomatoes)
marinara.add_ingredient(garlic)
marinara.add_ingredient(basil)
marinara.add_ingredient(olive_oil)

# Set cooking parameters
marinara.set_cooking_method("simmer")
marinara.set_duration("45m")
marinara.set_temperature(100)  # Celsius

Step 4: Cooking Process

Now, let's execute the cooking process step by step:

# Step 1: Heat oil and garlic
garlic_oil = kitchen.cook(
    [olive_oil, garlic],
    method="sauté",
    temperature=160,
    duration="5m",
    stirring_frequency="constant"
)

# Step 2: Add and cook tomatoes
tomato_mixture = kitchen.cook(
    [garlic_oil, tomatoes],
    method="simmer",
    temperature=100,
    duration="30m",
    stirring_frequency="occasional"
)

# Step 3: Blend the sauce
sauce = blender.blend(
    tomato_mixture,
    speed="medium",
    duration="1m",
    consistency="smooth"
)

# Step 4: Add basil and finish
final_sauce = kitchen.cook(
    [sauce, basil],
    method="simmer",
    temperature=90,
    duration="10m",
    stirring_frequency="occasional"
)

Step 5: Quality Control

Let's analyze our sauce to ensure it meets our standards:

from tomatopy import TasteTester

# Create taste tester
tester = TasteTester()

# Analyze sauce
profile = tester.analyze(final_sauce)

# Check quality metrics
print(f"Sweetness: {profile.sweetness}")
print(f"Acidity: {profile.acidity}")
print(f"Umami: {profile.umami}")
print(f"Overall balance: {profile.balance}")

# Get texture analysis
texture = tester.analyze_texture(final_sauce)
print(f"Consistency: {texture.consistency}")
print(f"Smoothness: {texture.smoothness}")

Step 6: Adjustments and Refinements

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}")

Troubleshooting

Common Issues

  1. Sauce Too Acidic

    # Add sugar to balance acidity
    sauce = kitchen.adjust(sauce, ingredient="sugar", amount=5)
  2. Sauce Too Thick

    # Add water to thin sauce
    sauce = kitchen.adjust(sauce, ingredient="water", amount=50)
  3. Insufficient Flavor

    # Add more garlic or basil
    sauce = kitchen.adjust(sauce, ingredient="garlic", amount=2)

Best Practices

  1. Always Check Ingredient Quality

    if not all(ing.is_fresh() for ing in [tomatoes, garlic, basil]):
        print("Warning: Some ingredients may not be fresh")
  2. Monitor Temperature

    with kitchen.temperature_monitor() as monitor:
        sauce = kitchen.cook(...)
        if monitor.get_max() > 110:
            print("Warning: Temperature too high")
  3. Regular Stirring

    # Set up automatic stirring
    kitchen.set_stirring_frequency("every_5m")

Next Steps

Last updated

Was this helpful?