Implements interfaces: twisted.web.iweb.IBodyProducer

StringProducer is a dummy body producer.

Instance Variable stopped A flag which indicates whether or not stopProducing has been called.
Instance Variable consumer After startProducing is called, the value of the consumer argument to that method.
Instance Variable finished After startProducing is called, a Deferred which was returned by that method. StringProducer will never fire this Deferred.
Method __init__ Undocumented
Method startProducing Start producing to the given IConsumer provider.
Method stopProducing No summary
stopped =
A flag which indicates whether or not stopProducing has been called.
consumer =
After startProducing is called, the value of the consumer argument to that method.
finished =
After startProducing is called, a Deferred which was returned by that method. StringProducer will never fire this Deferred.
def __init__(self, length):
Undocumented
def startProducing(self, consumer):

Start producing to the given IConsumer provider.

ReturnsA Deferred which stops production of data when Deferred.cancel is called, and which fires with None when all bytes have been produced or with a Failure if there is any problem before all bytes have been produced.
def stopProducing(self):

In addition to the standard behavior of IProducer.stopProducing (stop producing data), make sure the Deferred returned by startProducing is never fired.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.