Package wtf :: Package app :: Module cookie :: Class BaseCookieCodec
[hide private]
[frames] | no frames]

Class BaseCookieCodec

source code

object --+
         |
        BaseCookieCodec
Known Subclasses:

Base class for some codecs
Instance Methods [hide private]
 
UNSAFE_SEARCH(...)
search(string[, pos[, endpos]]) --> match object or None.
source code
 
__init__(self, config, opts, args)
Initialization
source code
 
__call__(self)
Determine codec instance
source code
str
quote(self, value)
Quote a value if necessary
source code
str
unquote(self, value)
Unquote a value if applicable
source code
 
encode(self, value)
Encode the cookie value
source code
 
decode(self, value)
Decode the cookie value
source code

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

Class Variables [hide private]
  __implements__ = [<class 'wtf.app.cookie.CookieCodecFactoryInt...
callable _UNSAFE_SEARCH
Unsafe char detection function
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

UNSAFE_SEARCH(...)

source code 
search(string[, pos[, endpos]]) --> match object or None. Scan through string looking for a match, and return a corresponding match object instance. Return None if no position in the string matches.

__init__(self, config, opts, args)
(Constructor)

source code 
Initialization
Overrides: object.__init__

quote(self, value)

source code 
Quote a value if necessary
Parameters:
  • value (str) - The value to inspect
Returns: str
The quoted value (or the original if no quoting is needed)

unquote(self, value)

source code 
Unquote a value if applicable
Parameters:
  • value (str) - The value to inspect
Returns: str
The unquoted value (or the original if no unquoting is needed)

Class Variable Details [hide private]

__implements__

Value:
[<class 'wtf.app.cookie.CookieCodecFactoryInterface'>,
 <class 'wtf.httputil.CookieCodecInterface'>]