...
Pipelets can define a custom set of configuration properties, which can will be exposed in the UI as a form (instead of a JSON input). This makes the configuration much more user friendly, and is the recommended way. To define its configuration, a pipelet should implement the getArguments() method.
The method is expected to return an array of objects defining each property. Inside each object, the fields name
, display_label
and type
are required. Optional field required
specifies whether the property is required to be filled by the user. Additionally, a property can be placed in an Advanced section of the configuration, by setting advanced
to true
True
on that property.
Code Block |
---|
from squirro.sdk import PipeletV1 class ModifyTitlePipelet(PipeletV1): # def __init__, def consume @staticmethod def getArguments(): return [ { 'name': 'commands', 'display_label': 'Source code', 'type': 'code', 'syntax': 'sqscript', 'required': True, }, { 'name': 'debug', 'display_label': 'Log debug output', 'type': 'bool', 'help': 'Logs debug output to the server log files', 'advanced': True, }, ] |
...