Toolkits > com.ibm.streamsx.topology 2.1.0 > com.ibm.streamsx.topology.python > Creating SPL Operators from Python code > @spl decorator options
@spl decorators support an number of options.
Options are passed as parameters to the decorators, for example:
# a,b,c will map to the first three attributes in the SPL tuple # SPLDOC for f will not include the source code in its description @spl.map(style='position', docpy=False) def f(a, b, c): pass
Note: For backwards compatibility @spl.pipe and @spl.sink do not support these options, defaulting to attributes by position and not including Python code in the function.
@spl.ignore does not accept any options.
Defines how the SPL tuple is passed into the decorated callable.
Can be set to:
Defaults to None, the passing style is defined by the callable's signature where possible, otherwise attributes by name will be used, equivalent to 'name'
Passing style dictionary is selected by having a callable signature with a single **kwargs parameter.
Passing style tuple is selected by having a callable signature with a single *args parameter.
Include the Python callable source code in the operator model.
Can be set to:
The source code is then included in the operator description when creating SPLDOC for the toolkit using spl-make-doc.