nodes

count_source(limit: int = 10000, start: int = 0) Generator[Annotated[int, Name(name=index)], None, None][source]
letter_source() Generator[Annotated[str, Name(name=letter)]][source]
word_source() Generator[Annotated[str, Name(name=word)]][source]
multi_words_source(n: int) Generator[Annotated[list[str], Name(name=multi_words)]][source]
sporadic_word(every: int = 3) Generator[Annotated[str, Name(name=word)] | None, None, None][source]
word_counts() Generator[tuple[Annotated[str, Name(name=word)], Annotated[list[int], Name(name=counts)]]][source]
multiply(left: int, right: int = 2) int[source]

Return value purposely unnamed, to be used as {nodename}.value

divide(numerator: int, denominator: int = 5) Annotated[float, Name(name=ratio)][source]
concat(strings: list[str]) str[source]
exclaim(string: str) str[source]
repeat(string: str, times: int) str[source]
dictify(key: str, items: list[Any]) dict[str, Any][source]
error(value: Any) None[source]
pydantic model CountSource[source]

Show JSON schema
{
   "title": "CountSource",
   "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"
      },
      "limit": {
         "default": 1000,
         "title": "Limit",
         "type": "integer"
      },
      "start": {
         "default": 0,
         "title": "Start",
         "type": "integer"
      }
   },
   "$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:
field limit: int = 1000
field start: int = 0
model_post_init(_Node__context: Any) None

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

process() Generator[Annotated[int, Name(name=index)], None, None][source]
pydantic model UnannotatedGenerator[source]

Show JSON schema
{
   "title": "UnannotatedGenerator",
   "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"
      },
      "limit": {
         "default": 1000,
         "title": "Limit",
         "type": "integer"
      },
      "start": {
         "default": 0,
         "title": "Start",
         "type": "integer"
      }
   },
   "$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:
field limit: int = 1000
field start: int = 0
model_post_init(_Node__context: Any) None

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

process()[source]
pydantic model Multiply[source]

Show JSON schema
{
   "title": "Multiply",
   "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:

model_post_init(_Node__context: Any) None

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

process(left: int, right: int = 2) Annotated[int, Name(name=product)][source]
class VolumeProcess(height: int = 2)[source]
process(width: int, depth: int) Annotated[int, Name(name=volume)][source]
class Volume(height: int = 2)[source]
volume(width: int, depth: int) Annotated[int, Name(name=volume)][source]
class Now[source]
print(prefix: str = 'Now: ') Annotated[str, Name(name=timestamp)][source]
class CountSourceDecor(start: int = 0)[source]
process() Generator[Annotated[int, Name(name=count)], None, None][source]
input_party(one: int, two: float, three: str, four: bool, five: list, six: dict, seven: set) Annotated[bool, Name(name=works)][source]
long_add(value: float, sleep_for: float = 0.25) float[source]
async number_to_letter(number: int, offset: int = 0) str[source]
class NumberToLetterCls(offset: int = 0)[source]
async process(number: int) str[source]
async async_error(value: Any) None[source]

Just raise an error!

class StatefulMultiply(start: int = 0)[source]
process(left: float, right: float = 1) float[source]
fast_forward(generator: count, n: int = 1) tuple[Annotated[int, Name(name=next)]][source]
jump(generator: count, n: int = 1) tuple[Annotated[count, Name(name=skirttt)], Annotated[int, Name(name=next)]][source]
rewind(generator: count, n: int = 1) Annotated[count, Name(name=skrittt)][source]

Purposely designed to mutate the input and return a new object

zip_iter(*args: Iterator) tuple[Any, ...][source]
increment(iterator: Iterator[int]) tuple[Annotated[Iterator[int], Name(name=iterator)], Annotated[int, Name(name=value)]][source]
passthrough(value: Any) Any[source]
pydantic model InitCounter[source]

Count how many times we have been initialized and deinitalized

Show JSON schema
{
   "title": "InitCounter",
   "description": "Count how many times we have been initialized and deinitalized",
   "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:

deinit() None[source]
init() None[source]
model_post_init(_Node__context: Any) None

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

process() tuple[Annotated[int, Name(name=inits)], Annotated[int, Name(name=deinits)]][source]