return

Special Return sink that tube runners use to return values from TubeRunner.process()

pydantic model Return[source]

Special sink node that returns values from a tube runner’s process method

Show JSON schema
{
   "title": "Return",
   "description": "Special sink node that returns values from a tube runner's `process` method",
   "type": "object",
   "properties": {
      "id": {
         "title": "Id",
         "type": "string"
      },
      "spec": {
         "anyOf": [
            {
               "$ref": "#/$defs/NodeSpecification"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "enabled": {
         "default": true,
         "title": "Enabled",
         "type": "boolean"
      },
      "stateful": {
         "default": true,
         "title": "Stateful",
         "type": "boolean"
      }
   },
   "$defs": {
      "NodeSpecification": {
         "description": "Specification for a single processing node within a tube .yaml file.",
         "properties": {
            "type": {
               "title": "Type",
               "type": "string"
            },
            "id": {
               "title": "Id",
               "type": "string"
            },
            "depends": {
               "anyOf": [
                  {
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "additionalProperties": {
                                 "type": "string"
                              },
                              "maxProperties": 1,
                              "minProperties": 1,
                              "type": "object"
                           }
                        ]
                     },
                     "type": "array"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Depends"
            },
            "params": {
               "anyOf": [
                  {
                     "additionalProperties": true,
                     "type": "object"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Params"
            },
            "enabled": {
               "default": true,
               "title": "Enabled",
               "type": "boolean"
            },
            "stateful": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Stateful"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Description"
            }
         },
         "required": [
            "type",
            "id"
         ],
         "title": "NodeSpecification",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "id"
   ]
}

Config:
  • extra: str = forbid

Fields:

get(keep: bool) Any | None[source]

Get the stored value from the process call, clearing it.

model_post_init(_Node__context: Any) None

See docstring of process() for description of post init wrapping of generators

process(*args: Any, **kwargs: Any) MetaSignal[source]

Store the incoming value to retrieve later with get()