API Reference
Lumache - Python library for cooks and food lovers.
This is a Python docstring, we can use Markdown syntax here because our API documentation library understands it (mkdocstrings).
# Import lumache
import lumache
# Call its only function
get_random_ingredients(kind=["cheeses"])
InvalidKindError
Bases: Exception
Raised if the kind is invalid.
Source code in latest/lumache.py
18 19 20 21 | |
get_random_ingredients(kind=None)
Return a list of random ingredients as strings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kind |
list[str] | None
|
Optional "kind" of ingredients. |
None
|
Returns:
| Type | Description |
|---|---|
list[str]
|
The ingredients list. |
Raises:
| Type | Description |
|---|---|
lumache.InvalidKindError
|
If the kind is invalid. |
Source code in latest/lumache.py
24 25 26 27 28 29 30 31 32 33 34 | |