Package amplee :: Package indexer :: Class ShelveContainer
[hide private]
[frames] | no frames]

Class ShelveContainer

source code

object --+
         |
        ShelveContainer

Instance Methods [hide private]
 
__init__(self, abs_path, protocol=2)
Simple container around the built-in shelve module.
source code
 
shutdown(self)
Closes the shelve container when not needed anymore.
source code
 
__contains__(self, key) source code
 
__getitem__(self, key) source code
 
__setitem__(self, key, value) source code
 
__delitem__(self, key) source code
 
__iter__(self) source code
 
iterkeys(self) source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, abs_path, protocol=2)
(Constructor)

source code 

Simple container around the built-in shelve module. This provides a simple and more-or-less efficient persistence system.

If you plan to create your own container, they must implement the shutdown() methods as-is.

Parameters:
  • abs_path (string) - absolute path of the shelve to open (and create if it does not exist).
  • protocol (int) - protocol value used by the open() function of the shelve module.
Overrides: object.__init__