Skip to content

Pipeline

dm.pipeline

Module providing the pipeline functionality.

Pipeline

The pipeline.

__init__(pipeline)

Initializer.

Parameters:

Name Type Description Default
pipeline TextIOWrapper

The pipeline input file.

required
run(input, input_encoding, output, output_encoding, context)

Executes the pipeline tasks.

Parameters:

Name Type Description Default
input BytesIO

the input stream for the pipeline

required
input_encoding str

the encoding of the input

required
output BytesIO

the output stream for the pipeline

required
output_encoding str

the encoding of the output

required
context Context

the execution context

required

Returns:

Type Description
Task

The task object used to execute the pipeline.

Raises:

Type Description
TaskException

when the pipeline input file can not be parsed.

tryParsingPipeline(context)

Tries to parse the pipeline file.

Parameters:

Name Type Description Default
context Context

the context used to evaluate the pipeline

required

Returns:

Type Description
_Element

The pipeline definition as an XML structure

Raises:

Type Description
TaskException

when the pipeline input file can not be parsed.