iterConnections

lsst.pipe.base.iterConnections(connections: PipelineTaskConnections, connectionType: str | Iterable[str]) Generator[BaseConnection, None, None]

Create an iterator over the selected connections type which yields all the defined connections of that type.

Parameters:
connectionsPipelineTaskConnections

An instance of a PipelineTaskConnections object that will be iterated over.

connectionTypestr

The type of connections to iterate over, valid values are inputs, outputs, prerequisiteInputs, initInputs, initOutputs.

Yields:
connection: BaseConnection

A connection defined on the input connections object of the type supplied. The yielded value Will be an derived type of BaseConnection.