Usageο
Installationο
To use Lumache, first install it using pip:
(.venv) $ pip install lumache
Creating recipesο
To retrieve a list of random ingredients,
you can use the lumache.get_random_ingredients() function:
- lumache.get_random_ingredients(kind=None)ο
Return a list of random ingredients as strings.
- Parameters:
kind (list[str] or None) β Optional βkindβ of ingredients.
- Raises:
lumache.InvalidKindError β If the kind is invalid.
- Returns:
The ingredients list.
- Return type:
The kind parameter should be either "meat", "fish",
or "veggies". Otherwise, lumache.get_random_ingredients()
will raise an exception.
- exception lumache.InvalidKindErrorο
Raised if the kind is invalid.
For example:
>>> import lumache
>>> lumache.get_random_ingredients()
['shells', 'gorgonzola', 'parsley']