3.3. Boing for developersΒΆ

Developers can easily deploy pipelines by invoking the Boing’s API in their Python code. The function boing.create() can be used to instantiate the pipeline’s nodes. This method requires as argument an URI expression that is used to specify the functionality of the nodes to be created and how they are connected. The Nodes reference table is the same as for the command line script. Then, the operators + and | can be used compose the pipeline.

The following code can be used as an example for creating Boing pipelines:

#!/usr/bin/env python3
import sys
import PyQt4
import boing

# Init application
app = PyQt4.QtGui.QApplication(sys.argv)

# Create nodes
n1 = boing.create("in.tuio://:3333")
n2 = boing.create("viz:")
n3 = boing.create("dump:?request=$..contacts")

# Compose the pipeline
graph = n1 + (n2 | n3)

# Run
sys.exit(app.exec_())

Todo

Describe an example of functional node.

Previous topic

3.2. Saving pipeline configurations

Next topic

4. Underlying concepts