bsddb.dbshelve
index
/astro-wise/AWEHOME/x86_64/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
bsddb.db.DBError(exceptions.Exception)
DBShelveError
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)

 
class DBShelveError(bsddb.db.DBError)
    
Method resolution order:
DBShelveError
bsddb.db.DBError
exceptions.Exception
exceptions.BaseException
__builtin__.object

Data descriptors inherited from bsddb.db.DBError:
__weakref__
list of weak references to the object (if defined)

Methods inherited from exceptions.Exception:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object at 0x719220>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message
exception message

 
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()