See tube.

Function skip A token value yielded by a tube meaning that its _Siphon should not deliver this value on, so that tubes may engage in flow control.
Function tube No summary
Function receiver Decorator for a stateless function which receives inputs.
Function series No summary
Class Diverter A Diverter is a drain which maintains a buffer of items not yet received by its IDivertable down-stream drain.
Class _Tubule A tube created for the @tube decorator.
Class _DrainingTube A _DrainingTube is an ITube that unbuffers a list of items. It is an implementation detail of the way that Diverter works.
Class _NullFount An almost no-op implementation of fount which does nothing but update its drain to point at itself.
def skip():

A token value yielded by a tube meaning that its _Siphon should not deliver this value on, so that tubes may engage in flow control.

def tube(cls):

tube is a class decorator which declares a given class to be an implementer of ITube and fills out any methods or attributes which are not present on the decorated type with null-implementation methods (those which return None) and None attributes.

ParametersclsA class with some or all of the attributes or methods described by ITube. (type: type)
Returnscls (type: type which implements ITube)
def receiver(inputType=None, outputType=None, name=None):

Decorator for a stateless function which receives inputs.

For example, to add 1 to each in a stream of numbers:

   @receiver(inputType=int, outputType=int)
   def addOne(item):
       yield item + 1
ParametersinputTypeThe inputType attribute of the resulting ITube.
outputTypeThe outputType attribute of the resulting ITube.
namea name describing the tubule for it to show as in a repr. (type: native str)
Returnsa stateless tube with the decorated method as its received method. (type: ITube)
def series(start, *tubes):

Connect up a series of objects capable of transforming inputs to outputs; convert a sequence of ITube objects into a sequence of connected IFount and IDrain objects. This is necessary to be able to flowTo an object implementing ITube.

This function can best be understood by understanding that:

   x = a
   a.flowTo(b).flowTo(c)

is roughly analagous to:

   x = series(a, b, c)

with the additional feature that series will convert a, b, and c to the requisite IDrain objects first.

ParametersstartThe initial element in the chain; the object that will consume inputs passed to the result of this call to series. (type: an ITube, or anything adaptable to IDrain.)
tubesEach element of plumbing. (type: a tuple of ITubes or objects adaptable to IDrain.)
ReturnsAn IDrain that can consume inputs of start's inputType, and whose flowingFrom will return an IFount that will produce outputs of plumbing[-1] (or start, if plumbing is empty). (type: IDrain)
RaisesTypeErrorif start, or any element of plumbing is not adaptable to IDrain.
API Documentation for tubes, generated by pydoctor at 2016-01-18 07:46:47.