bsddb.dbshelve
index
/usr/local/lib/python2.5/bsddb/dbshelve.py
Module Docs

Manage shelves of pickled objects using bsddb database files for the
storage.

 
Modules
       
cPickle
bsddb.db

 
Classes
       
UserDict.DictMixin
DBShelf
DBShelfCursor

 
class DBShelf(UserDict.DictMixin)
    A shelf to hold pickled objects, built upon a bsddb DB object.  It
automatically pickles/unpickles data objects going to/from the DB.
 
  Methods defined here:
__del__(self)
__delitem__(self, key)
__getattr__(self, name)
Many methods we can just pass through to the DB object.
(See below)
__getitem__(self, key)
__init__(self, dbenv=None)
__len__(self)
__setitem__(self, key, value)
append(self, value, txn=None)
associate(self, secondaryDB, callback, flags=0)
cursor(self, txn=None, flags=0)
get(self, *args, **kw)
#def get(self, key, default=None, txn=None, flags=0):
get_both(self, key, value, txn=None, flags=0)
items(self, txn=None)
join(self, cursorList, flags=0)
keys(self, txn=None)
put(self, key, value, txn=None, flags=0)
values(self, txn=None)

Methods inherited from UserDict.DictMixin:
__cmp__(self, other)
__contains__(self, key)
__iter__(self)
# second level definitions support higher levels
__repr__(self)
clear(self)
has_key(self, key)
iteritems(self)
# third level takes advantage of second level definitions
iterkeys(self)
itervalues(self)
# fourth level uses definitions from lower levels
pop(self, key, *args)
popitem(self)
setdefault(self, key, default=None)
update(self, other=None, **kwargs)

 
class DBShelfCursor
     Methods defined here:
__del__(self)
__getattr__(self, name)
Some methods we can just pass through to the cursor object.  (See below)
__init__(self, cursor)
consume(self, flags=0)
current(self, flags=0)
dup(self, flags=0)
first(self, flags=0)
get(self, *args)
get_1(self, flags)
get_2(self, key, flags)
get_3(self, key, value, flags)
get_both(self, key, value, flags=0)
last(self, flags=0)
next(self, flags=0)
next_dup(self, flags=0)
next_nodup(self, flags=0)
prev(self, flags=0)
prev_nodup(self, flags=0)
put(self, key, value, flags=0)
set(self, key, flags=0)
set_both = get_both(self, key, value, flags=0)
set_range(self, key, flags=0)
set_recno(self, recno, flags=0)

 
Functions
       
open(filename, flags=1, mode=432, filetype=2, dbenv=None, dbname=None)
A simple factory function for compatibility with the standard
shleve.py module.  It can be used like this, where key is a string
and data is a pickleable object:
 
    from bsddb import dbshelve
    db = dbshelve.open(filename)
 
    db[key] = data
 
    db.close()