Callback#

class tierkreis.worker.callback.Callback(channel: Channel, loc: Location)[source]#

Bases: RuntimeClient

Runtime client for use within a worker function, to submit graphs back to the parent runtime.

Methods

get_signature

Get the signature of functions available on the runtime.

run_graph

Execute a tierkreis graph on the runtime.

type_check_graph

Type check a tierkreis graph on the runtime against the runtime signature.

Attributes

can_type_check

Whether the runtime supports type-checking graphs.

property can_type_check: bool#

Whether the runtime supports type-checking graphs.

async get_signature() Signature[source]#

Get the signature of functions available on the runtime.

async run_graph(graph: TierkreisGraph, /, **py_inputs: Any) Dict[str, TierkreisValue][source]#

Execute a tierkreis graph on the runtime. Inputs are taken as keyword arguments and each keyword argument must match an input port of the graph. Non-tierkreis values will be converted to tierkreis values if possible.

async type_check_graph(graph: TierkreisGraph) TierkreisGraph[source]#

Type check a tierkreis graph on the runtime against the runtime signature.