Cube Types

class floe.api.cubes.ComputeCube(name=None, title=None, uuid=None, **parameters)

A compute cube

process(data, port)

To be implemented by a derived class, should process one item

class floe.api.cubes.Cube(name=None, title=None, uuid=None, **parameters)

A base compute cube

begin()

Can be implemented in a derived class to initialize a cube

emit(data, port=None)

Calling emit on the cube will send the output item to every output port

end()

Can be implemented in a derived class to finalize a cube

get_parameter_group(name: str)Tuple[str, floe.api.parameters.ParameterGroup]

Get a parameter group by name

input_ports()

Returns all of the input ports defined on this cube

modify_parameter(parameter, **fields)

Modify a cube’s parameter in the context of defining a floe.

WARNING: Never use this method on a standalone parameter or within a cube.

modify_parameter_group(group: floe.api.parameters.ParameterGroup, **fields: Union[int, str, List[floe.api.parameters.BaseParameter]])

Modify a cubes’s parameter group in the context of defining a floe.

neighbors()

Returns all of the downstream cubes of this cube

output_ports()

Returns all of the output ports defined on this cube

parameter_groups()

Returns all parameter groups

parameters()

Returns all of the parameters for a cube instance

wait_on(port)

Calling this function tells the runtime not to call process until data is received on the specified port

class floe.api.cubes.CubeGroup(name=None, cubes=None)

A container for grouping cubes together

class floe.api.cubes.CubeParametersMixin

Provides all of the built in parameters for a Cube.

See ParallelMixin, which redefines all hardware_group parameters so it can override spot_policy.

class floe.api.cubes.CycleDetails(in_cycle=False, cycle_head=None, size=0, next_cube=None)

This object is container for the following information: 1. Whether the object is in a cycle 2. If it is in a cycle, a reference to the first node in the cycle. This information is necessary for deadlock detection in cyclic floes.

class floe.api.cubes.ParallelComputeCube(name=None, title=None, uuid=None, **parameters)
class floe.api.cubes.ParallelCubeGroup(name=None, cubes=None)
class floe.api.cubes.ParallelMixin

Provides additional built in parameters for a Parallel Cube.

See CubeParametersMixin, which first defines hardware_group. ParallelMixin must redefine all hardware_group parameters so it can override spot_policy.

class floe.api.cubes.ParameterConnection(from_cube, from_parameter, to_cube, to_parameter)

Represents a parameter connection between stages

class floe.api.cubes.SinkCube(name=None, title=None, uuid=None, **parameters)

A cube that serves as output for the floe

write(data, port)

To be implemented in a derived class

class floe.api.cubes.SourceCube(name=None, title=None, uuid=None, **parameters)

A cube that inputs data into the floe