Skip to content

Function context

FunctionContext(function_id, schema, client, streams)

Container for the context of a StreamPipesFunction.

PARAMETER DESCRIPTION
function_id

The id of this function.

TYPE: str

schema

A dictionary which contains the schema of a data stream for each stream id.

TYPE: Dict[str, DataStream]

client

The client to interact with the API.

TYPE: StreamPipesClient

streams

The ids of the streams needed by this function.

TYPE: List[str]

add_data_stream_schema(stream_id, data_stream)

Adds a new data stream for a new stream id.

PARAMETER DESCRIPTION
stream_id

The id of the data stream.

TYPE: str

data_stream

The schema of the data stream.

TYPE: DataStream

RETURNS DESCRIPTION
None