How-to guides#

Configuration#

Get and set config items#

Using the config sub-command in the MatFlow CLI, we can get configuration items like this:

matflow config get machine

Items can be set like this:

matflow config set machine my-machine-name

In the Python API, we can interact with the MatFlow configuration as below. Note that we must call config.save to make the config changes persistent, otherwise any changes made will only be temporary.

import matflow as mf

# print the value of the `machine` item:
print(mf.config.machine)

# set the value of the `machine` item:
mf.config.machine = "my-machine-name"

# save the changes to the config file:
mf.config.save()

See the configuration reference documentation for a listing of configurable items.