Skip to content

io

Pipeline IO objects.

Classes:

  • IO

    Mapping with attribute access for pipeline inputs and outputs.

  • Input

    Represent the input to a pipeline step.

  • Output

    Represent the output to a pipeline step.

IO

Bases: dict[str, Any]

Mapping with attribute access for pipeline inputs and outputs.

Input

Bases: IO

Represent the input to a pipeline step.

Methods:

  • to_output

    Convert this input into an output object.

to_output

to_output() -> Output

Convert this input into an output object.

Source code in src/rago/io.py
39
40
41
def to_output(self) -> Output:
    """Convert this input into an output object."""
    return Output(**dict(self))

Output

Bases: IO

Represent the output to a pipeline step.

Methods:

  • as_input

    Convert this output into an input object.

  • from_input

    Create an output object from an input object.

as_input

as_input() -> Input

Convert this output into an input object.

Source code in src/rago/io.py
53
54
55
def as_input(self) -> Input:
    """Convert this output into an input object."""
    return Input(**dict(self))

from_input staticmethod

from_input(inp: Input) -> Output

Create an output object from an input object.

Source code in src/rago/io.py
48
49
50
51
@staticmethod
def from_input(inp: Input) -> Output:
    """Create an output object from an input object."""
    return Output(**dict(inp))