Known implementations: tubes._siphon._SiphonDrain, tubes.fan._InDrain, tubes.fan._OutDrain, tubes.listening.Listener, tubes.protocol._TransportDrain

A drain consumes objects from a fount.

Attribute inputType Similar to IFount.outputType.
Attribute fount The fount that is delivering data to this IDrain.
Method flowingFrom This drain is now accepting a flow from the given IFount.
Method receive An item was received from the fount.
Method flowStopped No summary
inputType =

Similar to IFount.outputType.

This is an ISpecification provider.

fount =

The fount that is delivering data to this IDrain.

def flowingFrom(fount):

This drain is now accepting a flow from the given IFount.

ParametersfountA fount, or None if no further input will be received. (type: IFount or types.NoneType)
Returnsanother IFount, if this IDrain will produce more data, or None.
def receive(item):

An item was received from the fount.

Parametersiteman instance of IDrain.inputType
Returnsa floating point number between 0.0 and 1.0, indicating the how full any buffers on the way to processing the data are (0-100%). Note that this may be greater than 100%, in which case you should probably stop sending for a while and give it a chance to recover.
def flowStopped(reason):

The flow has stopped. The given Failure object indicates why. After a IFount invokes this method, it must stop invoking all other methods on this IDrain; similarly, this IDrain must stop invoking all methods on its IFount.

ParametersreasonThe reason why the flow has terminated. This may contain any exception type, depending on the IFount delivering data to this IDrain. (type: Failure)
API Documentation for tubes, generated by pydoctor at 2016-01-18 07:46:47.