Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`protocols`.`htb`.`ShapedConsumer``

class documentation

`class ShapedConsumer(pcp.ProducerConsumerProxy): (source)`

Known subclasses: `twisted.protocols.htb.ShapedTransport`

View In Hierarchy

Wraps a `Consumer` and shapes the rate at which it receives data.

Method | `__init__` | Undocumented
Method | `stopProducing` | Stop producing data.
Class Variable | `iAmStreaming` | Undocumented
Instance Variable | `bucket` | Undocumented
Method | `_writeSomeData` | Write as much of this data as possible.

Inherited from `ProducerConsumerProxy`:

Method | `pauseProducing` | Undocumented
Method | `registerProducer` | Register to receive data from a producer.
Method | `resumeProducing` | Undocumented
Method | `unregisterProducer` | Stop consuming data from a producer, without disconnecting.
Method | `write` | The producer will write data by calling this method.
Class Variable | `bufferSize` | Undocumented
Instance Variable | `outstandingPull` | Undocumented
Instance Variable | `paused` | Undocumented
Instance Variable | `producerPaused` | Undocumented
Instance Variable | `unregistered` | Undocumented

Inherited from `BasicProducerConsumerProxy` (via `ProducerConsumerProxy`):

Method | `__repr__` | Undocumented
Method | `finish` | Undocumented
Class Variable | `stopped` | Undocumented
Instance Variable | `consumer` | the Consumer I publish to.
Instance Variable | `producer` | the Producer I subscribe to.
Instance Variable | `producerIsStreaming` | Undocumented
Instance Variable | `_buffer` | Undocumented

def __init__(self, consumer, bucket): (source)
overrides `twisted.protocols.pcp.BasicProducerConsumerProxy.__init__`

Undocumented

def stopProducing(self): (source)
from `twisted.internet.interfaces.IProducer`
overrides `twisted.protocols.pcp.BasicProducerConsumerProxy.stopProducing`

Stop producing data.

This tells a producer that its consumer has died, so it must stop producing data for good.

iAmStreaming: `bool` = (source)
overrides `twisted.protocols.pcp.BasicProducerConsumerProxy.iAmStreaming`
overridden in `twisted.protocols.htb.ShapedTransport`

Undocumented

bucket = (source)

Undocumented

def _writeSomeData(self, data): (source)
overrides `twisted.protocols.pcp.ProducerConsumerProxy._writeSomeData`

Write as much of this data as possible.

Returns
The number of bytes written.