arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

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.

circle-info

TomatoPyarrow-up-right enables you to slice, dice, cook with, and taste tomatoes using nothing but Python!

hashtag
Basic Usage

hashtag
Creating Your First Tomato

hashtag
Setting Up Your Virtual Kitchen

hashtag
Basic Cooking Operations

hashtag
Working with Multiple Ingredients

hashtag
Taste Testing

hashtag
Next Steps

  • - Learn about core TomatoPy concepts

  • - Follow a complete tutorial

  • - Explore the full API

hashtag
Tips and Tricks

Pro Tip: Use the debug() method to inspect ingredient properties:

Note: All measurements in TomatoPy use the metric system by default. Use the convert_to_imperial() method if needed.

Basic Concepts
Making Your First Marinara
API Reference
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"
from tomatopy import Kitchen

# Initialize your kitchen
kitchen = Kitchen()

# Configure kitchen settings
kitchen.set_temperature(180)  # Celsius
kitchen.set_humidity(65)      # Percentage
# 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
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)
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
my_tomato.debug()  # Prints detailed information about the tomato