Farmware manifest.json "args" key


I have noticed that there is an “args” key in the manifest, which seems to be an array. Can I add values there and reliably get and use them from inside the Farmware code, e.g. via sys.argv?


Yes, args are passed to the executable.

For future reference and clarity to other readers, values supplied using this method would be hard-coded into the manifest. There are alternative methods for allowing input from other sources such as the Web App (configs).


Great, thanks for confirming! The reason for this question is that I wanted to implement multiple instances of the MLH farmware, and I tried with adjusted manifests which pointed to the same binary. At first it looked as if that was a working solution, but I then found out that the farmware would not find its configs because it needs to know its own name to get these. So my idea is to pass in the manifest name via args so that the farmware can be told what its manifest name is.

@Gabriel Thinking of it I have opened a feature request: the name required for getting the config entries should be available in the environment, e.g. as FARMWARE_NAME or so?