usage.rst 667 B

12345678910111213141516171819202122232425262728293031323334
  1. Usage
  2. =====
  3. .. _installation:
  4. Installation
  5. ------------
  6. To use Lumache, first install it using pip:
  7. .. code-block:: console
  8. (.venv) $ pip install lumache
  9. Creating recipes
  10. ----------------
  11. To retrieve a list of random ingredients,
  12. you can use the ``lumache.get_random_ingredients()`` function:
  13. .. autofunction:: lumache.get_random_ingredients
  14. The ``kind`` parameter should be either ``"meat"``, ``"fish"``,
  15. or ``"veggies"``. Otherwise, :py:func:`lumache.get_random_ingredients`
  16. will raise an exception.
  17. .. autoexception:: lumache.InvalidKindError
  18. For example:
  19. >>> import lumache
  20. >>> lumache.get_random_ingredients()
  21. ['shells', 'gorgonzola', 'parsley']