Package redis :: Module connection :: Class PythonParser
[frames] | no frames]

Class PythonParser

source code

object --+
         |
        PythonParser

Plain Python parsing class

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__del__(self) source code
 
on_connect(self, connection)
Called when the socket connects
source code
 
on_disconnect(self)
Called when the socket disconnects
source code
 
read(self, length=None)
Read a line from the socket is no length is specified, otherwise read ``length`` bytes.
source code
 
parse_error(self, response)
Parse an error response
source code
 
read_response(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  MAX_READ_LENGTH = 1000000
  encoding = None
  EXCEPTION_CLASSES = {'ERR': <class 'redis.exceptions.ResponseE...
Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

read(self, length=None)

source code 

Read a line from the socket is no length is specified, otherwise read ``length`` bytes. Always strip away the newlines.


Class Variable Details

EXCEPTION_CLASSES

Value:
{'ERR': <class 'redis.exceptions.ResponseError'>,
 'NOSCRIPT': <class 'redis.exceptions.NoScriptError'>}