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 and offers a simple and intuitive API.
Check out the Usage section for further information, including how to Installation the project. Check also the Updating configuration settings about devices section!!
Note
This project is under active development.
Contents
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:
The kind
parameter should be either "meat"
, "fish"
,
or "veggies"
. Otherwise, lumache.get_random_ingredients()
will raise an exception.
For example:
>>> import lumache
>>> lumache.get_random_ingredients()
['shells', 'gorgonzola', 'parsley']
API
Updating configuration settings about devices
WalT allows users to show or modify device configuration settings by
using commands walt device config
or walt node config
. For
instance:
$ walt device config switch1 # show
$ walt device config switch1 lldp.explore=true # modify
$ walt node config virt-node ram=384M # modify
One may also show or change several settings at once, and/or show or update them on several devices at once. (See also: walt help show device-sets) For instance:
$ walt device config all-switches # show
$ walt device config all-switches lldp.explore=true poe.reboots=true
$ walt node config virt-node-1,virt-node-2 ram=384M
You can also use this command to indicate to walt server that an unknown device is actually a switch:
$ walt device config unknown-a2f2d3 type=switch
Here is the set of settings currently allowed:
Name |
possible values |
Applies to: |
Notes |
---|---|---|---|
lldp.explore |
true or false |
switches |
|
poe.reboots |
true or false |
switches |
|
snmp.version |
1 or 2 |
switches |
|
snmp.community |
e.g. ‘private’ |
switches |
|
type |
‘switch’ |
‘unknown’ devices |
|
netsetup |
‘NAT’ or ‘LAN’ |
devices of walt-net |
|
ram |
e.g. ‘384M’ or ‘1G’ |
virtual nodes |
|
cpu.cores |
e.g. 1 or 4 |
virtual nodes |
|
disks |
e.g. ‘8G’ or ‘32G,1T’ |
virtual nodes |
|
networks |
e.g. ‘walt-net,ext-net’ |
virtual nodes |
Notes:
See
`walt help show switch-install
<switch-install.md>`__Only allowed when changing device type from ‘unknown’ to ‘switch’
See
`walt help show device-netsetup
<device-netsetup.md>`__See
`walt help show vnode-networks
<vnode-networks.md>`__