mirror of
https://gitlab.com/fabinfra/fabaccess/docs.git
synced 2025-01-03 00:53:49 +01:00
Fixed Exampl
This commit is contained in:
parent
39284576d0
commit
df39998064
@ -1,3 +1,2 @@
|
|||||||
# API Reference
|
# API Reference
|
||||||
|
|
||||||
::: lumache
|
|
||||||
|
@ -2,14 +2,3 @@
|
|||||||
|
|
||||||
# Welcome to Lumache's documentation!
|
# Welcome to Lumache's documentation!
|
||||||
|
|
||||||
**Lumache** (/lu\'make/) is a Python library for cooks and food lovers
|
|
||||||
that creates recipes mixing random ingredients. It pulls data from the
|
|
||||||
[Open Food Facts database](https://world.openfoodfacts.org/) and offers
|
|
||||||
a *simple* and *intuitive* API.
|
|
||||||
|
|
||||||
Check out the [usage](usage) section for further information, including how to [install](usage#installation) the project.
|
|
||||||
|
|
||||||
!!! note
|
|
||||||
|
|
||||||
This project is under active development.
|
|
||||||
|
|
||||||
|
@ -1,34 +1,3 @@
|
|||||||
Usage
|
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']
|
|
||||||
```
|
|
||||||
|
Loading…
Reference in New Issue
Block a user