Package wtf :: Package app :: Package services :: Module session :: Class StorageInterface
[hide private]
[frames] | no frames]

Class StorageInterface

source code

object --+
         |
        StorageInterface

Interface for storage classes
Instance Methods [hide private]
 
set(self, name, value)
Set an attribute
source code
any
get(self, name)
Retrieve attribute
source code
 
delete(self, name)
Delete attribute
source code
bool
contains(self, name)
Determine whether an attribute exists
source code
bool
need_cookie(self)
Determine whether the storage needs a cookie to be set
source code
bool
need_store(self)
Determine whether the storage needs a store back
source code
str
make_cookie(self)
Create a cookie for the session
source code
 
store_back(self)
Persist the session data
source code
 
wipe(self)
Wipe out session data
source code

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

Instance Variables [hide private]
bool has_cookie
Is a cookie involved by this storage?
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

set(self, name, value)

source code 
Set an attribute
Parameters:
  • name (str) - Attribute name
  • value (any) - Attribute value

get(self, name)

source code 
Retrieve attribute
Parameters:
  • name (str) - Attribute name
Returns: any
Attribute value
Raises:
  • KeyError - Attribute not found

delete(self, name)

source code 
Delete attribute
Parameters:
  • name (str) - Attribute name
Raises:
  • KeyError - Attribute not found

contains(self, name)

source code 
Determine whether an attribute exists
Parameters:
  • name (str) - Attribute name to check
Returns: bool
Does it exist?

need_cookie(self)

source code 
Determine whether the storage needs a cookie to be set
Returns: bool
Does it need one?

need_store(self)

source code 
Determine whether the storage needs a store back
Returns: bool
Does it?

make_cookie(self)

source code 
Create a cookie for the session
Returns: str
The cookie string