Module Expr Str Assign NameStore NameLoad ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias alias Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call NameLoad handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad Call NameLoad NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore Call NameLoad ListLoad Str Str Str Str Str Str Str Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq SubscriptLoad NameLoad Slice Num Str body Assign NameStore SubscriptLoad NameLoad Slice Num If CompareEq AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad orelse If CompareEq AttributeLoad NameLoad attr NameLoad body If BoolOpOr UnaryOpNot NameLoad CompareNotIn SubscriptLoad NameLoad Index Num Str body If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr ListLoad NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return CompareIn NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad ListLoad NameLoad NameLoad Assign NameStore Dict Str NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad Call NameLoad NameLoad NameLoad If BoolOpOr CompareLt NameLoad Num CompareLt NameLoad Num body Raise Call NameLoad Str NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Num If CompareNotEq Call NameLoad NameLoad Num body Raise Call NameLoad Str NameLoad TryExcept body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad body Raise Call NameLoad Str NameLoad Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num NameLoad SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpAnd CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str CompareEq NameLoad Str body Return NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpOr CompareIn AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str body Assign AttributeStore AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Call AttributeLoad SubscriptLoad NameLoad Index Num attr orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad orelse If CompareEq Call NameLoad NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad orelse Raise Call NameLoad Str If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore NameLoad orelse Assign NameStore Lambda arguments args NameParam NameParam defaults Call NameLoad NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Delete AttributeDel NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIsNot AttributeLoad NameLoad attr NameLoad body TryExcept body TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad ListLoad NameLoad Call NameLoad AttributeLoad NameLoad attr orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr orelse If CompareNotEq AttributeLoad NameLoad attr NameLoad body If AttributeLoad NameLoad attr body Assign NameStore NameLoad orelse Assign NameStore NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad ListLoad NameLoad Delete AttributeDel NameLoad attr decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str TupleLoad If CompareNotEq Call NameLoad NameLoad Num body Raise Call NameLoad Str Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr ListComp BinOpMod Str TupleLoad NameLoad NameLoad comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad FunctionDef arguments args NameParam NameParam defaults body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list Assign NameStore Call NameLoad NameLoad Assign NameStore ListLoad NameLoad FunctionDef arguments args NameParam defaults body If CompareEq NameLoad ListLoad NameLoad body Assign SubscriptStore NameLoad Index Num Num Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body If CompareEq NameLoad ListLoad NameLoad body Assign SubscriptStore NameLoad Index Num Num TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareEq NameLoad ListLoad NameLoad body Assign SubscriptStore NameLoad Index Num Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list Assign NameStore Call NameLoad NameLoad NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body If CompareIs AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return Call AttributeLoad NameLoad attr NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Raise Call NameLoad If CompareLtE Call NameLoad NameLoad AttributeLoad NameLoad attr body AugAssignSub AttributeStore NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Raise Call NameLoad Str decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore Call NameLoad NameLoad BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr Return Call NameLoad NameLoad NameLoad decorator_list Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list ClassDef bases body Expr Str Expr Call NameLoad NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str decorator_list Assign NameStore Call NameLoad Str NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str decorator_list Assign NameStore Call NameLoad Str NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str decorator_list Assign NameStore Call NameLoad Str NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr Str If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad Call NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list decorator_list ClassDef bases body Expr Str Expr Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad BinOpMod Str Call NameLoad NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases body Expr Str Expr Call NameLoad NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults Lambda arguments args NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotEq AttributeLoad NameLoad attr Str body Return Call NameLoad Call NameLoad Assign AttributeStore NameLoad attr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body If CompareIn AttributeLoad NameLoad attr TupleLoad Str Str body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad decorator_list Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad ListLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str decorator_list Assign NameStore Call NameLoad Str NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareEq AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr Str orelse Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Return Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str TupleLoad If BoolOpOr CompareIn Str NameLoad CompareNotEq AttributeLoad NameLoad attr Str UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str decorator_list Assign NameStore Call NameLoad Str NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad ListLoad NameLoad Delete AttributeDel NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad Assign AttributeStore NameLoad attr Str For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr Str body Return Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Str Assign NameStore Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list decorator_list
N/A N/A 
An U{HTTP 1.1<http://www.w3.org/Protocols/rfc2616/rfc2616.html>} client.

The way to use the functionality provided by this module is to:

  - Connect a L{HTTP11ClientProtocol} to an HTTP server
  - Create a L{Request} with the appropriate data
  - Pass the request to L{HTTP11ClientProtocol.request}
  - The returned Deferred will fire with a L{Response} object
  - Create a L{IProtocol} provider which can handle the response body
  - Connect it to the response with L{Response.deliverBody}
  - When the protocol's C{connectionLost} method is called, the response is
    complete.  See L{Response.deliverBody} for details.

Various other classes in this module support this usage:

  - HTTPParser is the basic HTTP parser.  It can handle the parts of HTTP which
    are symmetric between requests and responses.

  - HTTPClientParser extends HTTPParser to handle response-specific parts of
    HTTP.  One instance is created for each request to parse the corresponding
    response.
 N/A __metaclass__ type zope.interface implements twisted.python log twisted.python.reflect fullyQualifiedName twisted.python.failure Failure twisted.internet.interfaces IConsumer IPushProducer twisted.internet.error ConnectionDone twisted.internet.defer Deferred succeed fail maybeDeferred twisted.internet.defer CancelledError twisted.internet.protocol Protocol twisted.protocols.basic LineReceiver twisted.web.http_headers Headers twisted.web.http NO_CONTENT NOT_MODIFIED twisted.web.http _DataLoss PotentialDataLoss twisted.web.http _IdentityTransferDecoder _ChunkedTransferDecoder iweb IResponse UNKNOWN_LENGTH N/A STATUS STATUS N/A HEADER HEADER N/A BODY BODY N/A DONE DONE BadHeaders N/A Exception N/A N/A 
    Headers passed to L{Request} were in some way invalid.
     N/A ExcessWrite N/A Exception N/A N/A 
    The body L{IBodyProducer} for a request tried to write data after
    indicating it had finished writing data.
     N/A ParseError N/A Exception N/A N/A 
    Some received data could not be parsed.

    @ivar data: The string which could not be parsed.
     __init__ N/A N/A self reason data N/A N/A N/A N/A N/A Exception __init__ self reason data N/A N/A self data data N/A N/A BadResponseVersion N/A ParseError N/A N/A 
    The version string in a status line was unparsable.
     N/A _WrapperException N/A Exception N/A N/A 
    L{_WrapperException} is the base exception type for exceptions which
    include one or more other exceptions as the low-level causes.

    @ivar reasons: A list of exceptions.  See subclass documentation for more
        details.
     __init__ N/A N/A self reasons N/A N/A N/A N/A N/A Exception __init__ self reasons N/A N/A self reasons reasons N/A N/A RequestGenerationFailed N/A _WrapperException N/A N/A 
    There was an error while creating the bytes which make up a request.

    @ivar reasons: A C{list} of one or more L{Failure} instances giving the
        reasons the request generation was considered to have failed.
     N/A RequestTransmissionFailed N/A _WrapperException N/A N/A 
    There was an error while sending the bytes which make up a request.

    @ivar reasons: A C{list} of one or more L{Failure} instances giving the
        reasons the request transmission was considered to have failed.
     N/A ConnectionAborted N/A Exception N/A N/A 
    The connection was explicitly aborted by application code.
     N/A WrongBodyLength N/A Exception N/A N/A 
    An L{IBodyProducer} declared the number of bytes it was going to
    produce (via its C{length} attribute) and then produced a different number
    of bytes.
     N/A ResponseDone N/A Exception N/A N/A 
    L{ResponseDone} may be passed to L{IProtocol.connectionLost} on the
    protocol passed to L{Response.deliverBody} and indicates that the entire
    response has been delivered.
     N/A ResponseFailed N/A _WrapperException N/A N/A 
    L{ResponseFailed} indicates that all of the response to a request was not
    received for some reason.

    @ivar reasons: A C{list} of one or more L{Failure} instances giving the
        reasons the response was considered to have failed.

    @ivar response: If specified, the L{Response} received from the server (and
        in particular the status code and the headers).
     __init__ N/A N/A self reasons response N/A None N/A N/A N/A N/A _WrapperException __init__ self reasons N/A N/A self response response N/A N/A ResponseNeverReceived N/A ResponseFailed N/A N/A 
    A L{ResponseFailed} that knows no response bytes at all have been received.
     N/A RequestNotSent N/A Exception N/A N/A 
    L{RequestNotSent} indicates that an attempt was made to issue a request but
    for reasons unrelated to the details of the request itself, the request
    could not be sent.  For example, this may indicate that an attempt was made
    to send a request using a protocol which is no longer connected to a
    server.
     N/A _callAppFunction N/A N/A function N/A N/A N/A 
    Call C{function}.  If it raises an exception, log it with a minimal
    description of the source.

    @return: C{None}
     N/A N/A N/A N/A function N/A N/A N/A N/A N/A N/A log err None N/A Unexpected exception from %s N/A N/A fullyQualifiedName function N/A HTTPParser N/A LineReceiver N/A N/A 
    L{HTTPParser} handles the parsing side of HTTP processing. With a suitable
    subclass, it can parse either the client side or the server side of the
    connection.

    @ivar headers: All of the non-connection control message headers yet
        received.

    @ivar state: State indicator for the response parsing state machine.  One
        of C{STATUS}, C{HEADER}, C{BODY}, C{DONE}.

    @ivar _partialHeader: C{None} or a C{list} of the lines of a multiline
        header while that header is being received.
     N/A delimiter N/A CONNECTION_CONTROL_HEADERS N/A set N/A content-length connection keep-alive te trailers transfer-encoding upgrade proxy-connection connectionMade N/A N/A self N/A N/A N/A N/A self headers N/A Headers N/A N/A self connHeaders N/A Headers N/A N/A self state STATUS N/A N/A self _partialHeader None N/A switchToBodyMode N/A N/A self decoder N/A N/A N/A 
        Switch to body parsing mode - interpret any more bytes delivered as
        part of the message body and deliver them to the given decoder.
         N/A N/A N/A self state BODY N/A N/A N/A RuntimeError already in body mode N/A N/A self bodyDecoder decoder N/A N/A self state BODY N/A N/A N/A self setRawMode N/A lineReceived N/A N/A self line N/A N/A N/A 
        Handle one line from a response.
         N/A N/A N/A line N/A -1 N/A N/A line N/A line N/A -1 N/A N/A N/A self state STATUS N/A N/A N/A N/A self statusReceived line N/A N/A self state HEADER N/A N/A N/A N/A self state HEADER N/A N/A N/A N/A line N/A N/A line N/A 0 N/A N/A N/A N/A self _partialHeader None N/A N/A header N/A N/A join N/A self _partialHeader N/A N/A name value N/A N/A header split : 1 N/A value N/A N/A value strip N/A N/A N/A self headerReceived name value N/A N/A line N/A N/A N/A N/A self allHeadersReceived N/A N/A N/A self _partialHeader N/A line N/A N/A N/A N/A N/A self _partialHeader append line N/A rawDataReceived N/A N/A self data N/A N/A N/A 
        Pass data from the message body to the body decoder object.
         N/A N/A N/A N/A self bodyDecoder dataReceived data N/A isConnectionControlHeader N/A N/A self name N/A N/A N/A 
        Return C{True} if the given lower-cased name is the name of a
        connection control header (rather than an entity header).

        According to RFC 2616, section 14.10, the tokens in the Connection
        header are probably relevant here.  However, I am not sure what the
        practical consequences of either implementing or ignoring that are.
        So I leave it unimplemented for the time being.
         N/A N/A name N/A self CONNECTION_CONTROL_HEADERS N/A statusReceived N/A N/A self status N/A N/A N/A 
        Callback invoked whenever the first line of a new message is received.
        Override this.

        @param status: The first line of an HTTP request or response message
            without trailing I{CR LF}.
        @type status: C{str}
         N/A headerReceived N/A N/A self name value N/A N/A N/A 
        Store the given header in C{self.headers}.
         N/A name N/A N/A name lower N/A N/A N/A self isConnectionControlHeader name N/A N/A headers N/A self connHeaders N/A N/A headers N/A self headers N/A N/A N/A headers addRawHeader name value N/A allHeadersReceived N/A N/A self N/A N/A N/A 
        Callback invoked after the last header is passed to C{headerReceived}.
        Override this to change to the C{BODY} or C{DONE} state.
         N/A N/A N/A self switchToBodyMode None N/A N/A HTTPClientParser N/A HTTPParser N/A N/A 
    An HTTP parser which only handles HTTP responses.

    @ivar request: The request with which the expected response is associated.
    @type request: L{Request}

    @ivar NO_BODY_CODES: A C{set} of response codes which B{MUST NOT} have a
        body.

    @ivar finisher: A callable to invoke when this response is fully parsed.

    @ivar _responseDeferred: A L{Deferred} which will be called back with the
        response when all headers in the response have been received.
        Thereafter, C{None}.

    @ivar _everReceivedData: C{True} if any bytes have been received.
     N/A NO_BODY_CODES N/A set N/A NO_CONTENT NOT_MODIFIED N/A _transferDecoders N/A chunked _ChunkedTransferDecoder N/A bodyDecoder None __init__ N/A N/A self request finisher N/A N/A N/A N/A self request request N/A N/A self finisher finisher N/A N/A self _responseDeferred N/A Deferred N/A N/A self _everReceivedData False N/A dataReceived N/A N/A self data N/A N/A N/A 
        Override so that we know if any response has been received.
         N/A N/A self _everReceivedData True N/A N/A N/A HTTPParser dataReceived self data N/A parseVersion N/A N/A self strversion N/A N/A N/A 
        Parse version strings of the form Protocol '/' Major '.' Minor. E.g.
        'HTTP/1.1'.  Returns (protocol, major, minor).  Will raise ValueError
        on bad syntax.
         N/A N/A N/A N/A proto strnumber N/A N/A strversion split / N/A N/A major minor N/A N/A strnumber split . N/A N/A major minor N/A N/A int major N/A int minor N/A N/A N/A ValueError N/A e N/A N/A N/A BadResponseVersion N/A str e strversion N/A N/A N/A major 0 N/A minor 0 N/A N/A N/A BadResponseVersion version may not be negative strversion N/A N/A proto major minor N/A statusReceived N/A N/A self status N/A N/A N/A 
        Parse the status line into its components and create a response object
        to keep track of this response's state.
         N/A parts N/A N/A status split 2 N/A N/A N/A len parts 3 N/A N/A N/A ParseError wrong number of parts status N/A N/A N/A statusCode N/A int N/A parts N/A 1 N/A N/A N/A ValueError N/A N/A N/A ParseError non-integer status code status N/A N/A self response N/A Response N/A N/A self parseVersion N/A parts N/A 0 statusCode N/A parts N/A 2 N/A self headers N/A self transport N/A _finished N/A N/A self rest N/A N/A N/A 
        Called to indicate that an entire response has been received.  No more
        bytes will be interpreted by this L{HTTPClientParser}.  Extra bytes are
        passed up and the state of this L{HTTPClientParser} is set to I{DONE}.

        @param rest: A C{str} giving any extra bytes delivered to this
            L{HTTPClientParser} which are not part of the response being
            parsed.
         N/A N/A self state DONE N/A N/A N/A self finisher rest N/A isConnectionControlHeader N/A N/A self name N/A N/A N/A 
        Content-Length in the response to a HEAD request is an entity header,
        not a connection control header.
         N/A N/A N/A N/A N/A self request method HEAD N/A name content-length N/A N/A False N/A N/A N/A HTTPParser isConnectionControlHeader self name N/A allHeadersReceived N/A N/A self N/A N/A N/A 
        Figure out how long the response body is going to be by examining
        headers and stuff.
         N/A N/A N/A N/A N/A self response code N/A self NO_BODY_CODES N/A N/A N/A self request method HEAD N/A N/A N/A N/A self response length 0 N/A N/A N/A self _finished N/A N/A self clearLineBuffer N/A N/A transferEncodingHeaders N/A N/A N/A self connHeaders getRawHeaders transfer-encoding N/A transferEncodingHeaders N/A N/A transferDecoder N/A N/A self _transferDecoders N/A N/A N/A N/A transferEncodingHeaders N/A 0 lower N/A N/A contentLengthHeaders N/A N/A N/A self connHeaders getRawHeaders content-length N/A N/A contentLengthHeaders None N/A N/A contentLength None N/A N/A N/A N/A len contentLengthHeaders 1 N/A N/A contentLength N/A int N/A contentLengthHeaders N/A 0 N/A N/A N/A self response length contentLength N/A N/A N/A ValueError Too many Content-Length headers; response is invalid N/A N/A contentLength 0 N/A N/A N/A N/A self _finished N/A N/A self clearLineBuffer N/A transferDecoder None N/A N/A transferDecoder N/A N/A N/A x y N/A N/A _IdentityTransferDecoder contentLength x y N/A N/A transferDecoder None N/A N/A N/A N/A N/A self response _bodyDataFinished N/A N/A N/A N/A N/A self transport pauseProducing N/A N/A N/A self switchToBodyMode N/A transferDecoder N/A N/A self response _bodyDataReceived N/A self _finished N/A N/A N/A N/A self _responseDeferred callback N/A self response N/A N/A self _responseDeferred N/A connectionLost N/A N/A self reason N/A N/A N/A N/A N/A self bodyDecoder None N/A N/A N/A N/A N/A N/A N/A N/A N/A self bodyDecoder noMoreData N/A N/A N/A PotentialDataLoss N/A N/A N/A N/A N/A self response _bodyDataFinished N/A Failure N/A N/A _DataLoss N/A N/A N/A N/A N/A self response _bodyDataFinished N/A Failure N/A ResponseFailed N/A reason N/A Failure N/A self response N/A N/A N/A N/A N/A self response _bodyDataFinished N/A N/A N/A N/A N/A N/A log err N/A N/A N/A N/A self state DONE N/A N/A N/A self _everReceivedData N/A N/A exceptionClass ResponseFailed N/A N/A exceptionClass ResponseNeverReceived N/A N/A N/A N/A self _responseDeferred errback N/A Failure N/A exceptionClass N/A reason N/A N/A self _responseDeferred N/A N/A Request N/A N/A N/A 
    A L{Request} instance describes an HTTP request to be sent to an HTTP
    server.

    @ivar method: The HTTP method to for this request, ex: 'GET', 'HEAD',
        'POST', etc.
    @type method: C{str}

    @ivar uri: The relative URI of the resource to request.  For example,
        C{'/foo/bar?baz=quux'}.
    @type uri: C{str}

    @ivar headers: Headers to be sent to the server.  It is important to
        note that this object does not create any implicit headers.  So it
        is up to the HTTP Client to add required headers such as 'Host'.
    @type headers: L{twisted.web.http_headers.Headers}

    @ivar bodyProducer: C{None} or an L{IBodyProducer} provider which
        produces the content body to send to the remote HTTP server.

    @ivar persistent: Set to C{True} when you use HTTP persistent connection.
    @type persistent: C{bool}
     __init__ N/A N/A self method uri headers bodyProducer persistent N/A False N/A N/A N/A self method method N/A N/A self uri uri N/A N/A self headers headers N/A N/A self bodyProducer bodyProducer N/A N/A self persistent persistent N/A _writeHeaders N/A N/A self transport TEorCL N/A N/A N/A hosts N/A N/A N/A self headers getRawHeaders host N/A N/A N/A N/A len hosts 1 N/A N/A N/A BadHeaders Exactly one Host header required N/A requestLines N/A N/A N/A N/A requestLines append N/A %s %s HTTP/1.1
 N/A N/A self method N/A self uri N/A N/A N/A self persistent N/A N/A N/A N/A requestLines append Connection: close
 N/A N/A TEorCL None N/A N/A N/A N/A requestLines append TEorCL N/A N/A name values N/A N/A N/A self headers getAllRawHeaders N/A N/A N/A N/A requestLines extend N/A N/A %s: %s
 N/A name v N/A v values N/A N/A N/A requestLines append N/A N/A N/A transport writeSequence requestLines N/A _writeToChunked N/A N/A self transport N/A N/A N/A 
        Write this request to the given transport using chunked
        transfer-encoding to frame the body.
         N/A N/A N/A self _writeHeaders transport Transfer-Encoding: chunked
 N/A encoder N/A ChunkedEncoder transport N/A N/A N/A encoder registerProducer N/A self bodyProducer True N/A d N/A N/A N/A self bodyProducer startProducing encoder cbProduced N/A N/A ignored N/A N/A N/A N/A N/A encoder unregisterProducer N/A ebProduced N/A N/A err N/A N/A N/A N/A N/A encoder _allowNoMoreWrites N/A N/A N/A transport unregisterProducer N/A err N/A N/A N/A N/A d addCallbacks cbProduced ebProduced N/A d N/A _writeToContentLength N/A N/A self transport N/A N/A N/A 
        Write this request to the given transport using content-length to frame
        the body.
         N/A N/A N/A self _writeHeaders transport N/A Content-Length: %d
 N/A N/A N/A self bodyProducer length N/A finishedConsuming N/A Deferred N/A encoder N/A LengthEnforcingConsumer N/A self bodyProducer transport finishedConsuming N/A N/A N/A transport registerProducer N/A self bodyProducer True N/A finishedProducing N/A N/A N/A self bodyProducer startProducing encoder combine N/A N/A consuming producing N/A N/A cancelConsuming N/A N/A ign N/A N/A N/A N/A N/A finishedProducing cancel N/A N/A ultimate N/A Deferred cancelConsuming N/A state N/A None ebConsuming N/A N/A err N/A N/A N/A N/A state N/A None N/A N/A N/A state N/A 0 1 N/A N/A N/A ultimate errback err N/A N/A N/A N/A log err err N/A Buggy state machine in %r/[%d]: ebConsuming called N/A self N/A state N/A 0 N/A cbProducing N/A N/A result N/A N/A N/A N/A state N/A None N/A N/A N/A state N/A 0 2 N/A N/A N/A N/A N/A encoder _noMoreWritesExpected N/A N/A N/A N/A N/A N/A ultimate errback N/A N/A N/A N/A ultimate callback None N/A ebProducing N/A N/A err N/A N/A N/A N/A state N/A None N/A N/A N/A state N/A 0 3 N/A N/A N/A encoder _allowNoMoreWrites N/A N/A N/A ultimate errback err N/A N/A N/A N/A log err err Producer is buggy N/A N/A N/A N/A consuming addErrback ebConsuming N/A N/A N/A producing addCallbacks cbProducing ebProducing N/A ultimate N/A N/A d N/A combine finishedConsuming finishedProducing f N/A N/A passthrough N/A N/A N/A N/A N/A transport unregisterProducer N/A passthrough N/A N/A N/A N/A d addBoth f N/A d N/A writeTo N/A N/A self transport N/A N/A N/A 
        Format this L{Request} as an HTTP/1.1 request and write it to the given
        transport.  If bodyProducer is not None, it will be associated with an
        L{IConsumer}.

        @return: A L{Deferred} which fires with C{None} when the request has
            been completely written to the transport or with a L{Failure} if
            there is any problem generating the request bytes.
         N/A N/A N/A self bodyProducer None N/A N/A N/A N/A N/A self bodyProducer length UNKNOWN_LENGTH N/A N/A N/A N/A self _writeToChunked transport N/A N/A N/A N/A self _writeToContentLength transport N/A N/A N/A N/A self _writeHeaders transport None N/A N/A succeed None N/A stopWriting N/A N/A self N/A N/A N/A 
        Stop writing this request to the transport.  This can only be called
        after C{writeTo} and before the L{Deferred} returned by C{writeTo}
        fires.  It should cancel any asynchronous task started by C{writeTo}.
        The L{Deferred} returned by C{writeTo} need not be fired if this method
        is called.
         N/A N/A _callAppFunction N/A N/A self bodyProducer stopProducing N/A N/A LengthEnforcingConsumer N/A N/A N/A 
    An L{IConsumer} proxy which enforces an exact length requirement on the
    total data written to it.

    @ivar _length: The number of bytes remaining to be written.

    @ivar _producer: The L{IBodyProducer} which is writing to this
        consumer.

    @ivar _consumer: The consumer to which at most C{_length} bytes will be
        forwarded.

    @ivar _finished: A L{Deferred} which will be fired with a L{Failure} if too
        many bytes are written to this consumer.
     __init__ N/A N/A self producer consumer finished N/A N/A N/A N/A self _length N/A producer length N/A N/A self _producer producer N/A N/A self _consumer consumer N/A N/A self _finished finished N/A _allowNoMoreWrites N/A N/A self N/A N/A N/A 
        Indicate that no additional writes are allowed.  Attempts to write
        after calling this method will be met with an exception.
         N/A N/A self _finished None N/A write N/A N/A self bytes N/A N/A N/A 
        Write C{bytes} to the underlying consumer unless
        C{_noMoreWritesExpected} has been called or there are/have been too
        many bytes.
         N/A N/A N/A self _finished None N/A N/A N/A N/A N/A self _producer stopProducing N/A N/A ExcessWrite N/A N/A N/A len bytes N/A self _length N/A N/A N/A self _length N/A len bytes N/A N/A N/A N/A self _consumer write bytes N/A N/A N/A _callAppFunction N/A N/A self _producer stopProducing N/A N/A N/A N/A self _finished errback N/A WrongBodyLength too many bytes written N/A N/A N/A self _allowNoMoreWrites N/A _noMoreWritesExpected N/A N/A self N/A N/A N/A 
        Called to indicate no more bytes will be written to this consumer.
        Check to see that the correct number have been written.

        @raise WrongBodyLength: If not enough bytes have been written.
         N/A N/A N/A self _finished None N/A N/A N/A N/A self _allowNoMoreWrites N/A N/A self _length N/A N/A N/A WrongBodyLength too few bytes written N/A N/A makeStatefulDispatcher N/A N/A name template N/A N/A N/A 
    Given a I{dispatch} name and a function, return a function which can be
    used as a method and which, when called, will call another method defined
    on the instance and return the result.  The other method which is called is
    determined by the value of the C{_state} attribute of the instance.

    @param name: A string which is used to construct the name of the subsidiary
        method to invoke.  The subsidiary method is named like C{'_%s_%s' %
        (name, _state)}.

    @param template: A function object which is used to give the returned
        function a docstring.

    @return: The dispatcher function.
     dispatcher N/A N/A self N/A args kwargs N/A N/A func N/A getattr self N/A N/A N/A _ name _ N/A self _state None N/A N/A func None N/A N/A N/A RuntimeError N/A %r has no %s method in state %s N/A self name N/A self _state N/A N/A func args kwargs N/A N/A N/A dispatcher __doc__ N/A template __doc__ N/A dispatcher N/A Response N/A N/A N/A 
    A L{Response} instance describes an HTTP response received from an HTTP
    server.

    L{Response} should not be subclassed or instantiated.

    @ivar _transport: The transport which is delivering this response.

    @ivar _bodyProtocol: The L{IProtocol} provider to which the body is
        delivered.  C{None} before one has been registered with
        C{deliverBody}.

    @ivar _bodyBuffer: A C{list} of the strings passed to C{bodyDataReceived}
        before C{deliverBody} is called.  C{None} afterwards.

    @ivar _state: Indicates what state this L{Response} instance is in,
        particularly with respect to delivering bytes from the response body
        to an application-suppled protocol object.  This may be one of
        C{'INITIAL'}, C{'CONNECTED'}, C{'DEFERRED_CLOSE'}, or C{'FINISHED'},
        with the following meanings:

          - INITIAL: This is the state L{Response} objects start in.  No
            protocol has yet been provided and the underlying transport may
            still have bytes to deliver to it.

          - DEFERRED_CLOSE: If the underlying transport indicates all bytes
            have been delivered but no application-provided protocol is yet
            available, the L{Response} moves to this state.  Data is
            buffered and waiting for a protocol to be delivered to.

          - CONNECTED: If a protocol is provided when the state is INITIAL,
            the L{Response} moves to this state.  Any buffered data is
            delivered and any data which arrives from the transport
            subsequently is given directly to the protocol.

          - FINISHED: If a protocol is provided in the DEFERRED_CLOSE state,
            the L{Response} moves to this state after delivering all
            buffered data to the protocol.  Otherwise, if the L{Response} is
            in the CONNECTED state, if the transport indicates there is no
            more data, the L{Response} moves to this state.  Nothing else
            can happen once the L{Response} is in this state.
     N/A N/A implements IResponse N/A length UNKNOWN_LENGTH N/A _bodyProtocol None N/A _bodyFinished False __init__ N/A N/A self version code phrase headers _transport N/A N/A N/A N/A self version version N/A N/A self code code N/A N/A self phrase phrase N/A N/A self headers headers N/A N/A self _transport _transport N/A N/A self _bodyBuffer N/A N/A N/A self _state INITIAL N/A deliverBody N/A N/A self protocol N/A N/A N/A 
        Dispatch the given L{IProtocol} depending of the current state of the
        response.
         N/A N/A deliverBody N/A makeStatefulDispatcher deliverBody deliverBody _deliverBody_INITIAL N/A N/A self protocol N/A N/A N/A 
        Deliver any buffered data to C{protocol} and prepare to deliver any
        future data to it.  Move to the C{'CONNECTED'} state.
         N/A N/A N/A N/A self _transport resumeProducing N/A N/A N/A protocol makeConnection N/A self _transport N/A N/A self _bodyProtocol protocol N/A data N/A self _bodyBuffer N/A N/A N/A N/A N/A self _bodyProtocol dataReceived data N/A N/A self _bodyBuffer None N/A N/A self _state CONNECTED N/A _deliverBody_CONNECTED N/A N/A self protocol N/A N/A N/A 
        It is invalid to attempt to deliver data to a protocol when it is
        already being delivered to another protocol.
         N/A N/A RuntimeError N/A Response already has protocol %r, cannot deliverBody again N/A N/A self _bodyProtocol N/A _deliverBody_DEFERRED_CLOSE N/A N/A self protocol N/A N/A N/A 
        Deliver any buffered data to C{protocol} and then disconnect the
        protocol.  Move to the C{'FINISHED'} state.
         N/A N/A N/A protocol makeConnection N/A self _transport N/A data N/A self _bodyBuffer N/A N/A N/A N/A protocol dataReceived data N/A N/A self _bodyBuffer None N/A N/A N/A protocol connectionLost N/A self _reason N/A N/A self _state FINISHED N/A _deliverBody_FINISHED N/A N/A self protocol N/A N/A N/A 
        It is invalid to attempt to deliver data to a protocol after the
        response body has been delivered to another protocol.
         N/A N/A RuntimeError Response already finished, cannot deliverBody now. N/A _bodyDataReceived N/A N/A self data N/A N/A N/A 
        Called by HTTPClientParser with chunks of data from the response body.
        They will be buffered or delivered to the protocol passed to
        deliverBody.
         N/A N/A _bodyDataReceived N/A makeStatefulDispatcher bodyDataReceived _bodyDataReceived _bodyDataReceived_INITIAL N/A N/A self data N/A N/A N/A 
        Buffer any data received for later delivery to a protocol passed to
        C{deliverBody}.

        Little or no data should be buffered by this method, since the
        transport has been paused and will not be resumed until a protocol
        is supplied.
         N/A N/A N/A N/A self _bodyBuffer append data N/A _bodyDataReceived_CONNECTED N/A N/A self data N/A N/A N/A 
        Deliver any data received to the protocol to which this L{Response}
        is connected.
         N/A N/A N/A N/A self _bodyProtocol dataReceived data N/A _bodyDataReceived_DEFERRED_CLOSE N/A N/A self data N/A N/A N/A 
        It is invalid for data to be delivered after it has been indicated
        that the response body has been completely delivered.
         N/A N/A RuntimeError Cannot receive body data after _bodyDataFinished N/A _bodyDataReceived_FINISHED N/A N/A self data N/A N/A N/A 
        It is invalid for data to be delivered after the response body has
        been delivered to a protocol.
         N/A N/A RuntimeError Cannot receive body data after protocol disconnected N/A _bodyDataFinished N/A N/A self reason N/A None N/A N/A 
        Called by HTTPClientParser when no more body data is available.  If the
        optional reason is supplied, this indicates a problem or potential
        problem receiving all of the response body.
         N/A N/A _bodyDataFinished N/A makeStatefulDispatcher bodyDataFinished _bodyDataFinished _bodyDataFinished_INITIAL N/A N/A self reason N/A None N/A N/A 
        Move to the C{'DEFERRED_CLOSE'} state to wait for a protocol to
        which to deliver the response body.
         N/A N/A self _state DEFERRED_CLOSE N/A N/A reason None N/A N/A reason N/A Failure N/A ResponseDone Response body fully received N/A N/A self _reason reason N/A _bodyDataFinished_CONNECTED N/A N/A self reason N/A None N/A N/A 
        Disconnect the protocol and move to the C{'FINISHED'} state.
         N/A N/A reason None N/A N/A reason N/A Failure N/A ResponseDone Response body fully received N/A N/A N/A N/A self _bodyProtocol connectionLost reason N/A N/A self _bodyProtocol None N/A N/A self _state FINISHED N/A _bodyDataFinished_DEFERRED_CLOSE N/A N/A self N/A N/A N/A 
        It is invalid to attempt to notify the L{Response} of the end of the
        response body data more than once.
         N/A N/A RuntimeError Cannot finish body data more than once N/A _bodyDataFinished_FINISHED N/A N/A self N/A N/A N/A 
        It is invalid to attempt to notify the L{Response} of the end of the
        response body data more than once.
         N/A N/A RuntimeError Cannot finish body data after protocol disconnected N/A N/A ChunkedEncoder N/A N/A N/A 
    Helper object which exposes L{IConsumer} on top of L{HTTP11ClientProtocol}
    for streaming request bodies to the server.
     N/A N/A implements IConsumer __init__ N/A N/A self transport N/A N/A N/A N/A self transport transport N/A _allowNoMoreWrites N/A N/A self N/A N/A N/A 
        Indicate that no additional writes are allowed.  Attempts to write
        after calling this method will be met with an exception.
         N/A N/A self transport None N/A registerProducer N/A N/A self producer streaming N/A N/A N/A 
        Register the given producer with C{self.transport}.
         N/A N/A N/A N/A self transport registerProducer producer streaming N/A write N/A N/A self data N/A N/A N/A 
        Write the given request body bytes to the transport using chunked
        encoding.

        @type data: C{str}
         N/A N/A N/A self transport None N/A N/A N/A ExcessWrite N/A N/A N/A N/A self transport writeSequence N/A N/A %x
 N/A len data data N/A unregisterProducer N/A N/A self N/A N/A N/A 
        Indicate that the request body is complete and finish the request.
         N/A N/A N/A self write N/A N/A N/A N/A self transport unregisterProducer N/A N/A N/A self _allowNoMoreWrites N/A N/A TransportProxyProducer N/A N/A N/A 
    An L{IPushProducer} implementation which wraps another such thing and
    proxies calls to it until it is told to stop.

    @ivar _producer: The wrapped L{IPushProducer} provider or C{None} after
        this proxy has been stopped.
     N/A N/A implements IPushProducer N/A disconnecting False __init__ N/A N/A self producer N/A N/A N/A N/A self _producer producer N/A _stopProxying N/A N/A self N/A N/A N/A 
        Stop forwarding calls of L{IPushProducer} methods to the underlying
        L{IPushProvider} provider.
         N/A N/A self _producer None N/A stopProducing N/A N/A self N/A N/A N/A 
        Proxy the stoppage to the underlying producer, unless this proxy has
        been stopped.
         N/A N/A N/A self _producer None N/A N/A N/A N/A N/A self _producer stopProducing N/A resumeProducing N/A N/A self N/A N/A N/A 
        Proxy the resumption to the underlying producer, unless this proxy has
        been stopped.
         N/A N/A N/A self _producer None N/A N/A N/A N/A N/A self _producer resumeProducing N/A pauseProducing N/A N/A self N/A N/A N/A 
        Proxy the pause to the underlying producer, unless this proxy has been
        stopped.
         N/A N/A N/A self _producer None N/A N/A N/A N/A N/A self _producer pauseProducing N/A N/A HTTP11ClientProtocol N/A Protocol N/A N/A 
    L{HTTP11ClientProtocol} is an implementation of the HTTP 1.1 client
    protocol.  It supports as few features as possible.

    @ivar _parser: After a request is issued, the L{HTTPClientParser} to
        which received data making up the response to that request is
        delivered.

    @ivar _finishedRequest: After a request is issued, the L{Deferred} which
        will fire when a L{Response} object corresponding to that request is
        available.  This allows L{HTTP11ClientProtocol} to fail the request
        if there is a connection or parsing problem.

    @ivar _currentRequest: After a request is issued, the L{Request}
        instance used to make that request.  This allows
        L{HTTP11ClientProtocol} to stop request generation if necessary (for
        example, if the connection is lost).

    @ivar _transportProxy: After a request is issued, the
        L{TransportProxyProducer} to which C{_parser} is connected.  This
        allows C{_parser} to pause and resume the transport in a way which
        L{HTTP11ClientProtocol} can exert some control over.

    @ivar _responseDeferred: After a request is issued, the L{Deferred} from
        C{_parser} which will fire with a L{Response} when one has been
        received.  This is eventually chained with C{_finishedRequest}, but
        only in certain cases to avoid double firing that Deferred.

    @ivar _state: Indicates what state this L{HTTP11ClientProtocol} instance
        is in with respect to transmission of a request and reception of a
        response.  This may be one of the following strings:

          - QUIESCENT: This is the state L{HTTP11ClientProtocol} instances
            start in.  Nothing is happening: no request is being sent and no
            response is being received or expected.

          - TRANSMITTING: When a request is made (via L{request}), the
            instance moves to this state.  L{Request.writeTo} has been used
            to start to send a request but it has not yet finished.

          - TRANSMITTING_AFTER_RECEIVING_RESPONSE: The server has returned a
            complete response but the request has not yet been fully sent
            yet.  The instance will remain in this state until the request
            is fully sent.

          - GENERATION_FAILED: There was an error while the request.  The
            request was not fully sent to the network.

          - WAITING: The request was fully sent to the network.  The
            instance is now waiting for the response to be fully received.

          - ABORTING: Application code has requested that the HTTP connection
            be aborted.

          - CONNECTION_LOST: The connection has been lost.

    @ivar _abortDeferreds: A list of C{Deferred} instances that will fire when
        the connection is lost.
     N/A _state QUIESCENT N/A _parser None N/A _finishedRequest None N/A _currentRequest None N/A _transportProxy None N/A _responseDeferred None __init__ N/A N/A self quiescentCallback N/A N/A N/A N/A c N/A None N/A N/A N/A self _quiescentCallback quiescentCallback N/A N/A self _abortDeferreds N/A N/A state N/A N/A self N/A N/A N/A N/A self _state N/A property request N/A N/A self request N/A N/A N/A 
        Issue C{request} over C{self.transport} and return a L{Deferred} which
        will fire with a L{Response} instance or an error.

        @param request: The object defining the parameters of the request to
           issue.
        @type request: L{Request}

        @rtype: L{Deferred}
        @return: The deferred may errback with L{RequestGenerationFailed} if
            the request was not fully written to the transport due to a local
            error.  It may errback with L{RequestTransmissionFailed} if it was
            not fully written to the transport due to a network error.  It may
            errback with L{ResponseFailed} if the request was sent (not
            necessarily received) but some or all of the response was lost.  It
            may errback with L{RequestNotSent} if it is not possible to send
            any more requests using this L{HTTP11ClientProtocol}.
         N/A N/A N/A self _state QUIESCENT N/A N/A N/A fail N/A RequestNotSent N/A N/A self _state TRANSMITTING N/A _requestDeferred N/A maybeDeferred N/A request writeTo N/A self transport cancelRequest N/A N/A ign N/A N/A N/A N/A N/A self _state N/A TRANSMITTING TRANSMITTING_AFTER_RECEIVING_RESPONSE N/A N/A N/A N/A _requestDeferred cancel N/A N/A N/A N/A N/A self transport abortConnection N/A N/A N/A self _disconnectParser N/A Failure N/A CancelledError N/A N/A N/A self _finishedRequest N/A Deferred cancelRequest N/A N/A self _currentRequest request N/A N/A self _transportProxy N/A TransportProxyProducer N/A self transport N/A N/A self _parser N/A HTTPClientParser request N/A self _finishResponse N/A N/A N/A N/A self _parser makeConnection N/A self _transportProxy N/A N/A self _responseDeferred N/A N/A self _parser _responseDeferred cbRequestWrotten N/A N/A ignored N/A N/A N/A N/A N/A self _state TRANSMITTING N/A N/A N/A self _state WAITING N/A N/A N/A N/A self _responseDeferred chainDeferred N/A self _finishedRequest N/A ebRequestWriting N/A N/A err N/A N/A N/A N/A N/A self _state TRANSMITTING N/A N/A N/A self _state GENERATION_FAILED N/A N/A N/A N/A self transport abortConnection N/A N/A N/A N/A self _finishedRequest errback N/A Failure N/A RequestGenerationFailed N/A err N/A N/A N/A N/A log err err N/A Error writing request, but not in valid state to finalize request: %s N/A self _state N/A N/A N/A N/A _requestDeferred addCallbacks cbRequestWrotten ebRequestWriting N/A N/A self _finishedRequest N/A _finishResponse N/A N/A self rest N/A N/A N/A 
        Called by an L{HTTPClientParser} to indicate that it has parsed a
        complete response.

        @param rest: A C{str} giving any trailing bytes which were given to
            the L{HTTPClientParser} which were not part of the response it
            was parsing.
         N/A N/A _finishResponse N/A makeStatefulDispatcher finishResponse _finishResponse _finishResponse_WAITING N/A N/A self rest N/A N/A N/A N/A N/A self _state WAITING N/A N/A N/A self _state QUIESCENT N/A N/A N/A self _state TRANSMITTING_AFTER_RECEIVING_RESPONSE N/A N/A N/A N/A self _responseDeferred chainDeferred N/A self _finishedRequest N/A N/A N/A self _parser None N/A N/A N/A reason N/A ConnectionDone synthetic! N/A connHeaders N/A N/A N/A N/A self _parser connHeaders getRawHeaders connection N/A N/A N/A N/A close connHeaders N/A N/A self _state QUIESCENT N/A N/A N/A self _currentRequest persistent N/A N/A N/A N/A self _giveUp N/A Failure reason N/A N/A N/A N/A N/A N/A self _quiescentCallback self N/A N/A N/A N/A N/A N/A log err N/A N/A N/A N/A self transport loseConnection N/A N/A N/A self _disconnectParser reason N/A N/A _finishResponse_TRANSMITTING _finishResponse_WAITING _disconnectParser N/A N/A self reason N/A N/A N/A 
        If there is still a parser, call its C{connectionLost} method with the
        given reason.  If there is not, do nothing.

        @type reason: L{Failure}
         N/A N/A N/A self _parser None N/A N/A parser N/A self _parser N/A N/A self _parser None N/A N/A self _currentRequest None N/A N/A self _finishedRequest None N/A N/A self _responseDeferred None N/A N/A N/A N/A self _transportProxy _stopProxying N/A N/A self _transportProxy None N/A N/A N/A parser connectionLost reason N/A _giveUp N/A N/A self reason N/A N/A N/A 
        Lose the underlying connection and disconnect the parser with the given
        L{Failure}.

        Use this method instead of calling the transport's loseConnection
        method directly otherwise random things will break.
         N/A N/A N/A N/A self transport loseConnection N/A N/A N/A self _disconnectParser reason N/A dataReceived N/A N/A self bytes N/A N/A N/A 
        Handle some stuff from some place.
         N/A N/A N/A N/A N/A N/A self _parser dataReceived bytes N/A N/A N/A N/A N/A N/A self _giveUp N/A Failure N/A connectionLost N/A N/A self reason N/A N/A N/A 
        The underlying transport went away.  If appropriate, notify the parser
        object.
         N/A N/A connectionLost N/A makeStatefulDispatcher connectionLost connectionLost _connectionLost_QUIESCENT N/A N/A self reason N/A N/A N/A 
        Nothing is currently happening.  Move to the C{'CONNECTION_LOST'}
        state but otherwise do nothing.
         N/A N/A self _state CONNECTION_LOST N/A _connectionLost_GENERATION_FAILED N/A N/A self reason N/A N/A N/A 
        The connection was in an inconsistent state.  Move to the
        C{'CONNECTION_LOST'} state but otherwise do nothing.
         N/A N/A self _state CONNECTION_LOST N/A _connectionLost_TRANSMITTING N/A N/A self reason N/A N/A N/A 
        Fail the L{Deferred} for the current request, notify the request
        object that it does not need to continue transmitting itself, and
        move to the C{'CONNECTION_LOST'} state.
         N/A N/A self _state CONNECTION_LOST N/A N/A N/A N/A self _finishedRequest errback N/A Failure N/A RequestTransmissionFailed N/A reason N/A N/A self _finishedRequest N/A N/A N/A N/A self _currentRequest stopWriting N/A _connectionLost_TRANSMITTING_AFTER_RECEIVING_RESPONSE N/A N/A self reason N/A N/A N/A 
        Move to the C{'CONNECTION_LOST'} state.
         N/A N/A self _state CONNECTION_LOST N/A _connectionLost_WAITING N/A N/A self reason N/A N/A N/A 
        Disconnect the response parser so that it can propagate the event as
        necessary (for example, to call an application protocol's
        C{connectionLost} method, or to fail a request L{Deferred}) and move
        to the C{'CONNECTION_LOST'} state.
         N/A N/A N/A self _disconnectParser reason N/A N/A self _state CONNECTION_LOST N/A _connectionLost_ABORTING N/A N/A self reason N/A N/A N/A 
        Disconnect the response parser with a L{ConnectionAborted} failure, and
        move to the C{'CONNECTION_LOST'} state.
         N/A N/A N/A self _disconnectParser N/A Failure N/A ConnectionAborted N/A N/A self _state CONNECTION_LOST N/A d N/A self _abortDeferreds N/A N/A N/A N/A d callback None N/A N/A self _abortDeferreds N/A N/A abort N/A N/A self N/A N/A N/A 
        Close the connection and cause all outstanding L{request} L{Deferred}s
        to fire with an error.
         N/A N/A N/A self _state CONNECTION_LOST N/A N/A N/A succeed None N/A N/A N/A N/A self transport loseConnection N/A N/A self _state ABORTING N/A d N/A Deferred N/A N/A N/A N/A self _abortDeferreds append d N/A d N/A N/A