using the bsddb from Python (missing docs!)

M

Michele Simionato

I was browsing through the source tree of Python 2.4b2 and in Lib/bsddb/test
I found a lot of interesting stuff. It seems that the support for the bsd
database is much better than documented in the standard library
http://www.python.org/dev/doc/devel/lib/module-bsddb.html.
There are tests for locking, transactions, join, etc.
Is there some documentation anywhere?
I could infer what I need from the tests but maybe there is already
some nice article on the net explaining everything I want to know and more
;-) OTOH, I do not find Python-centric documentation in the sleepycat web
site.

Michele Simionato
 
J

Josiah Carlson

I was browsing through the source tree of Python 2.4b2 and in Lib/bsddb/test
I found a lot of interesting stuff. It seems that the support for the bsd
database is much better than documented in the standard library
http://www.python.org/dev/doc/devel/lib/module-bsddb.html.
Indeed.

There are tests for locking, transactions, join, etc.
Is there some documentation anywhere?
I could infer what I need from the tests but maybe there is already
some nice article on the net explaining everything I want to know and more
;-) OTOH, I do not find Python-centric documentation in the sleepycat web
site.

I'm not aware of any documentation, but I haven't looked much. I've
just been checking out the dir(dbinstance.db), which offers cursors and
all sorts of other good stuff.

Sorry I can't really help you.

Thinking about it, it may be that much of the stuff isn't documented
and/or exposed because they wanted a simple dictionary-like interface to
bsddb.

- Josiah
 
V

vincent wehren

Michele said:
I was browsing through the source tree of Python 2.4b2 and in Lib/bsddb/test
I found a lot of interesting stuff. It seems that the support for the bsd
database is much better than documented in the standard library
http://www.python.org/dev/doc/devel/lib/module-bsddb.html.
There are tests for locking, transactions, join, etc.
Is there some documentation anywhere?
I could infer what I need from the tests but maybe there is already
some nice article on the net explaining everything I want to know and more
;-) OTOH, I do not find Python-centric documentation in the sleepycat web
site.

Michele Simionato

The bsddb3 package has become part of the standard library as of 2.3, I
believe. The docs for this "full blown" bsddb package are not (yet) part
of Python docs, but off-site on http://pybsddb.sourceforge.net/bsddb3.html.

Slightly OT, but maybe of interest, is that the Python bsddb package
allows you to use the full power of BerkeleyDB even if you decide to
make your projects closed-source - should you have any licensing doubts.

Kind regards,
 
M

Michele Simionato

vincent wehren said:
The bsddb3 package has become part of the standard library as of 2.3, I
believe. The docs for this "full blown" bsddb package are not (yet) part
of Python docs, but off-site on http://pybsddb.sourceforge.net/bsddb3.html.

I am a bit confused about pybsddb; is pybsddb exactly the same as the module
bsddb in Python 2.3+ ? Originally I thought that pybsddb had more stuff in it,
but now I tend to believe that they are the same. It is confusing since the
docs are not in the standard distribution, so it is not clear if they are the
same package (as optik and optparse, for instance) or not. Also, the docs
of pybsddb are kind of terse: there is the API but there are no examples, so
they are not very suitable for people without previous experience with the
sleepycat database. This is the reason why I asked is somebody is aware of
some journal article, or tutorial, or other useful stuff.


Michele Simionato
 
V

vincent wehren

Michele said:
I am a bit confused about pybsddb; is pybsddb exactly the same as the module
bsddb in Python 2.3+ ? Originally I thought that pybsddb had more stuff in it,
but now I tend to believe that they are the same. It is confusing since the
docs are not in the standard distribution, so it is not clear if they are the
same package (as optik and optparse, for instance) or not. Also, the docs
of pybsddb are kind of terse: there is the API but there are no examples, so
they are not very suitable for people without previous experience with the
sleepycat database. This is the reason why I asked is somebody is aware of
some journal article, or tutorial, or other useful stuff.


Michele Simionato

My guess is that it is the same thing, but that the release schedule
varies. Using the print_version() function from test_all.py in the test
directory with Python 2.3.4 gives:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Sleepycat Software: Berkeley DB 4.1.25: (December 19, 2002)
bsddb.db.version(): (4, 1, 25)
bsddb.db.__version__: 4.2.0.2
bsddb.db.cvsid: $Id: _bsddb.c,v 1.17.6.4 2004/03/16 07:47:45 greg
Exp $
python version: 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32
bit (Intel)]
My pid: 1056
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

The version of pybsddb on Sourceforge is at 4.2.4.


I don't know any documentation besides the API stuff. So I guess that
inference from what happens in the test modules probably does give you
the most mileage ;).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top