Quick Start Guide
Get up and running with TomatoPy in minutes! This guide will walk you through the basics of creating and manipulating virtual ingredients.
Basic Usage
Creating Your First Tomato
from tomatopy import Tomato
# Create a fresh tomato
my_tomato = Tomato(
ripeness=0.8, # 80% ripe
variety="San Marzano",
weight=150 # grams
)
# Check tomato properties
print(my_tomato.ripeness) # 0.8
print(my_tomato.variety) # "San Marzano"
Setting Up Your Virtual Kitchen
from tomatopy import Kitchen
# Initialize your kitchen
kitchen = Kitchen()
# Configure kitchen settings
kitchen.set_temperature(180) # Celsius
kitchen.set_humidity(65) # Percentage
Basic Cooking Operations
# Create a sauce from your tomato
sauce = kitchen.cook(
my_tomato,
method="simmer",
duration="30m",
temperature=100
)
# Check sauce properties
print(sauce.consistency) # "smooth"
print(sauce.volume) # 250 # ml
Working with Multiple Ingredients
from tomatopy import Ingredient, Recipe
# Create additional ingredients
garlic = Ingredient("garlic", amount=3, unit="cloves")
basil = Ingredient("basil", amount=10, unit="leaves")
# Create a recipe
marinara = Recipe("Classic Marinara")
marinara.add_ingredient(my_tomato)
marinara.add_ingredient(garlic)
marinara.add_ingredient(basil)
# Cook the recipe
sauce = kitchen.cook_recipe(marinara)
Taste Testing
from tomatopy import TasteTester
# Create a taste tester
tester = TasteTester()
# Analyze your sauce
profile = tester.analyze(sauce)
# Get taste metrics
print(profile.acidity) # 0.7
print(profile.sweetness) # 0.3
print(profile.umami) # 0.8
Next Steps
Basic Concepts - Learn about core TomatoPy concepts
Making Your First Marinara - Follow a complete tutorial
API Reference - Explore the full API
Tips and Tricks
Pro Tip: Use the
debug()
method to inspect ingredient properties:my_tomato.debug() # Prints detailed information about the tomato
Note: All measurements in TomatoPy use the metric system by default. Use the
convert_to_imperial()
method if needed.
Last updated
Was this helpful?