mirror of
https://gitlab.com/fabinfra/fabaccess/docs.git
synced 2024-11-17 04:37:57 +01:00
35 lines
705 B
Markdown
35 lines
705 B
Markdown
|
Usage
|
||
|
=====
|
||
|
|
||
|
Installation
|
||
|
------------
|
||
|
|
||
|
To use Lumache, first install it using pip:
|
||
|
|
||
|
```console
|
||
|
(.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
|
||
|
options:
|
||
|
show_root_heading: true
|
||
|
|
||
|
<br>
|
||
|
|
||
|
The `kind` parameter should be either `"meat"`, `"fish"`, or `"veggies"`.
|
||
|
Otherwise, [`get_random_ingredients`][lumache.get_random_ingredients] will raise an exception [`lumache.InvalidKindError`](/api#lumache.InvalidKindError).
|
||
|
|
||
|
For example:
|
||
|
|
||
|
```python
|
||
|
>>> import lumache
|
||
|
>>> lumache.get_random_ingredients()
|
||
|
['shells', 'gorgonzola', 'parsley']
|
||
|
```
|