tubes API Documentation

Class Hierarchy

  • Exception
    • tubes.itube.AlreadyUnpaused - The IPause has already been unpaused.
    • tubes.itube.StopFlowCalled - IFount.stopFlow was called, and that's why the flow was stopped.
  • object
    • tubes._siphon._Siphon - A _Siphon is an IDrain and possibly also an IFount, and provides lots of conveniences to make it easy to implement something that does fancy flow control with just a few methods.
    • tubes._siphon._SiphonPiece - Shared functionality between _SiphonFount and _SiphonDrain
      • tubes._siphon._SiphonDrain - Implementation of IDrain for _Siphon.
      • tubes._siphon._SiphonFount - Implementation of IFount for _Siphon.
    • tubes._siphon.SiphonPendingValues - A queue of pending values which can be suspended and resumed, for representing values pending delivery for a _Siphon.
    • tubes.fan._InDrain - The one of the drains associated with an fan.In.
    • tubes.fan._InFount - An _InFount is the single fount associated with an In.
    • tubes.fan._OutDrain - An _OutDrain is the single IDrain associated with an Out.
    • tubes.fan._OutFount - The concrete fount type returned by Out.newFount.
    • tubes.fan.In -

      A fan.In presents a single fount that delivers the inputs from multiple drains:

      
      
    • tubes.fan.Out -

      A fan.Out presents a single drain that delivers the inputs to multiple founts:

      
      
    • tubes.framing._CarriageReturnRemover - Automatically fix newlines, because hacker news.
    • tubes.framing._FramesToSegments - A tube which could convert "frames" - discrete chunks of data - into "segments" - parts of a raw data stream, with framing headers or delimiters attached.
    • tubes.framing._NotDisconnecting - Enough of a transport to pretend to not be disconnecting.
    • tubes.framing._SegmentsToFrames - Convert segments into frames by parsing them.
    • tubes.framing._Transporter - Just enough of a mock of ITransport to work with the protocols in basic, as a wrapper around a callable taking some data.
    • tubes.kit._Pause - Implementation of IPause for Pauser.
    • tubes.kit.NoPause - A null implementation of IPause that does nothing.
    • tubes.kit.OncePause - Pause a pauser once, unpause it if necessary.
    • tubes.kit.Pauser - Multiple parties may be interested in suppressing some ongoing concurrent activity, each for their own purposes.
    • tubes.listening._OnStop - Call a callback when the flow stops.
    • tubes.listening.Flow - A Flow is a combination of a Fount and a Drain, representing a bi-directional communication channel such as a TCP connection.
    • tubes.listening.Listener - A Listener is a drain that accepts Flows and sets them up.
    • tubes.memory._IteratorTube - An _IteratorTube is an ITube delivering the values from an iterable.
    • tubes.protocol._FountImpl - Implementation of fount for listening port.
    • tubes.protocol._FountProducer - A _FountProducer is an adapter to IPushProducer for an IFount.
    • tubes.protocol._TransportDrain - A _TransportDrain is an IDrain that wraps around an object that provides ITransport and IConsumer, and delivers data to that transport, and flow-control notifications from the consumer.
    • tubes.protocol._TransportFount - An IFount that wraps around an ITransport, and, with the help of a _ProtocolPlumbing, delivers any data received by that ITransport to an IDrain.
    • tubes.routing._To - An object destined for a specific destination.
    • tubes.routing.Routed - A Routed is a specification describing another specification that has been wrapped in a to. As such, it is an incomplete implementation of ISpecification.
    • tubes.routing.Router - A drain with multiple founts that consumes Routed(IX) from its input and produces IX to its outputs.
    • tubes.tube._DrainingTube - A _DrainingTube is an ITube that unbuffers a list of items. It is an implementation detail of the way that Diverter works.
    • tubes.tube._NullFount - An almost no-op implementation of fount which does nothing but update its drain to point at itself.
      • tubes.memory._NotQuiteNull - A _NotQuiteNull is a fount that delivers a StopIteration flowStopped after yielding its values.
    • tubes.tube._Tubule - A tube created for the @tube decorator.
  • proxyForInterface(IDrain, '_drain')
    • tubes.tube.Diverter - A Diverter is a drain which maintains a buffer of items not yet received by its IDivertable down-stream drain.
  • proxyForInterface(IDrain, '_outDrain')
    • tubes.fan.Thru -

      A fan.Thru takes an input and fans it thru multiple drains-which-produce-founts, such as tubes:

      
      
  • twisted.internet.protocol.Protocol - This is the base class for streaming connection-oriented protocols.
    • tubes.protocol._ProtocolPlumbing - An adapter between an ITransport and IFount / IDrain interfaces.
  • zope.interface.Interface
    • tubes.itube.IDrain - A drain consumes objects from a fount.
    • tubes.itube.IFount - A fount produces objects for a drain to consume.
    • tubes.itube.IFrame - This is a marker interface for a bytes which represents a discrete, separated sequence of bytes within a protocol; contrast with ISegment.
    • tubes.itube.IPause - A pause is a reason that an IFount is not delivering output to its drain attribute. This reason may be removed by unpausing the pause.
    • tubes.itube.ISegment - This is a marker interface for a bytes which represents the arbitrarily-sized segments of data that a stream-oriented protocol may deliver; contrast with IFrame.
    • tubes.itube.ITube - A tube transforms input into output.
      • tubes.itube.IDivertable - An IDivertable is an ITube which may have its input diverted away from it.