Basic Concepts
Understanding the core concepts of TomatoPy will help you make the most of the library. This guide introduces the fundamental ideas and components.
Core Components
1. Ingredients
Ingredients are the building blocks of TomatoPy. Each ingredient has properties that affect how it behaves during cooking operations.
2. Kitchen
The Kitchen class represents your virtual cooking environment. It manages cooking operations and maintains environmental conditions.
3. Recipes
Recipes combine multiple ingredients and define how they should be prepared.
Key Concepts
1. Property System
Ingredients have properties that affect their behavior:
Physical Properties: weight, volume, density
Chemical Properties: pH, water content, sugar content
Culinary Properties: ripeness, freshness, texture
2. Cooking Operations
Cooking operations transform ingredients through various methods:
Heat Application: simmering, boiling, roasting
Mechanical Action: chopping, blending, kneading
Chemical Changes: fermentation, curing
3. State Management
Ingredients maintain state throughout cooking operations:
Advanced Concepts
1. Flavor Profiles
Ingredients and cooked products have flavor profiles:
2. Unit Conversion
TomatoPy handles unit conversions automatically:
3. Error Handling
The library includes robust error handling:
Best Practices
Always Use Virtual Environments
Check Ingredient Properties Before Cooking
Use Type Hints for Better Code
Next Steps
Core Modules - Dive deeper into specific modules
Tutorials - Follow step-by-step guides
API Reference - Explore the full API documentation
Last updated
Was this helpful?