using the bsddb from Python (missing docs!)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michele Simionato

    #1

    using the bsddb from Python (missing docs!)

    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/...ule-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
  • Josiah Carlson

    #2
    Re: using the bsddb from Python (missing docs!)


    michele.simiona to@gmail.com (Michele Simionato) wrote:[color=blue]
    >
    > 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/...ule-bsddb.html.[/color]

    Indeed.
    [color=blue]
    > 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.[/color]

    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

    Comment

    • vincent wehren

      #3
      Re: using the bsddb from Python (missing docs!)

      Michele Simionato wrote:[color=blue]
      > 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/...ule-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[/color]

      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,

      --
      Vincent Wehren



      Comment

      • Michele Simionato

        #4
        Re: using the bsddb from Python (missing docs!)

        vincent wehren <vincent@visual trans.de> wrote in message news:<cnk73p$11 3$1@news2.zwoll 1.ov.home.nl>.. .[color=blue]
        > 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.[/color]

        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

        Comment

        • vincent wehren

          #5
          Re: using the bsddb from Python (missing docs!)

          Michele Simionato wrote:[color=blue]
          > vincent wehren <vincent@visual trans.de> wrote in message news:<cnk73p$11 3$1@news2.zwoll 1.ov.home.nl>.. .
          >[color=green]
          >>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.[/color]
          >
          >
          > 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[/color]

          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.versio n(): (4, 1, 25)
          bsddb.db.__vers ion__: 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 ;).

          --
          Vincent Wehren

          Comment

          Working...