Questions tagged [bsddb]

bsddb is the Python interface to the Berkeley DB embedded database library.

It used to be shipped with Python (2.x), but as of Python 3 has been split off into a separate package.

The name comes about from the Berkeley Software Distribution (BSD) which contained the original Berkeley DB.

34 questions
1
vote
1 answer

License question related to bsddb

I plan to use bsddb/pybsddb in a commercial product written in python for windows and linux. I also plan to use py2exe. Yet I am not sure about the legal implications. I have read that commercial products don't have to pay royalties as long as it…
Darx Kies
  • 61
  • 1
  • 3
1
vote
1 answer

bsddb3 cannot read whole file

My code for creating Berkeley DB file: def create_bdb_object(filename): bdb = bsddb3.db.DB() bdb.set_flags(bsddb3.db.DB_DUP | bsddb3.db.DB_DUPSORT) open_flags = bsddb3.db.DB_CREATE | bsddb3.db.DB_EXCL if os.path.exists(filename) and…
Virynka
  • 23
  • 3
1
vote
1 answer

How Best to Convert a Pickled Python Dictionary Using Python shelve Library (bsddb) to a JSON File that has tuple Values for Dictionary Keys

I have an application where I need to convert Python shelve pickled dictionary files to JSON files. import ujson, shelve with open("shelveFile", "r") as sfile: shelve_dict=shelve.open(sfile) py_dict= dict(shelve_dict) with…
Mark
  • 61
  • 10
1
vote
2 answers

Expressing multiple columns in berkeley db in python?

Say I have a simple table that contains username, firstname, lastname. How do I express this in berkeley Db? I'm currently using bsddb as the interface. Cheers.
John Jiang
  • 11,069
  • 12
  • 51
  • 60
1
vote
2 answers

Store dictionary in database

I create a Berkeley database, and operate with it using bsddb module. And I need to store there information in a style, like this: username = '....' notes = {'name_of_note1':{ 'password':'...', …
user3156971
  • 1,095
  • 2
  • 15
  • 17
1
vote
1 answer

How to use Berkeley DB in an application without installing

I'm using Berkeley DB in a python project, and I am wondering if I can make the libraries available to python without specifically installing berkeley DB. How can you embed Berkeley DB in an application generally? Has anyone done this with python…
xcorat
  • 1,434
  • 2
  • 17
  • 34
1
vote
2 answers

Open Berkeley DB version 1.85 in Python on a non BSD system

How can I open Berkeley DB 1.85 file in Python on a non BSD system (Ubuntu, RHEL)? $ file 1.db 1.db: Berkeley DB 1.85 (Hash, version 2, native byte-order) The code i am trying to run: import bsddb cur_dir = os.path.dirname(__file__) …
warvariuc
  • 57,116
  • 41
  • 173
  • 227
1
vote
2 answers

How to write (long) integer values to Berkeley DB using bsddb3?

I am trying to use Berkeley DB to store a frequency table (i.e. hashtable with string keys and integer values). The table will be written, updated, and read from Python; so I am currently experimenting with bsddb3. This looks like it will do most of…
winwaed
  • 7,645
  • 6
  • 36
  • 81
0
votes
1 answer

bsddb in Python and Unix

I haven't heard of bsddb till recently. http://www.oracle.com/us/products/database/berkeley-db/index.html http://en.wikipedia.org/wiki/Berkeley_DB I haven't been able to figure out what exactly it is. bsddb seems to be installed on my Mac but I…
oxuser
  • 1,257
  • 2
  • 16
  • 23
0
votes
1 answer

Retrieving a range of data from values Berkeley DB

How can I retrieve a range of data such as 10 < value < 20 from Berkeley DB? I use Python with bsddb3.
0
votes
1 answer

bsddb3 DB.get/put hangs with transaction

I'm fairly new to Berkeley DB, and I'm attempting to use it in Python with bsddb3 with transactions for power-safety With DB_AUTO_COMMIT and no transaction argument reads and writes work just fine. But the moment I call get/put with a manual…
Justin Olbrantz
  • 647
  • 3
  • 11
0
votes
1 answer

bsddb: difference between hash format, btree format, and record format

I'm using bsddb in a Python script as basically a drop in replacement for a dictionary that's too large to fit into memory. Looking at the documentation for the Python wrapper, I can use either bsddb.hashopen, bsddb.btopen, or bsddb.rnopen, but I…
George
  • 1,843
  • 2
  • 13
  • 24
0
votes
0 answers

BerkeleyDB / Python (bsddb3) get list of removed files

I am using Python, BerkeleyDB and bsddb3 lib for an script which store many informations. After use the same environment while months I get the following error : bsddb3.db.DBNoSuchFileError But I have many files in my environment. I don't know…
Samuel Dauzon
  • 10,744
  • 13
  • 61
  • 94
0
votes
2 answers

DEADLOCK_WRAP error when using Berkeley Db in python (bsddb)

I am using a berkdb to store a huge list of key-value pairs but for some reason when i try to access some of the data later i get this error: try: key = 'scrape011201-590652' contenttext = contentdict[key] except: print the error
JiminyCricket
  • 7,050
  • 7
  • 42
  • 59
0
votes
1 answer

How do i view data in database which i have stored in Berkeley db?

I am storing a values in form of dictionary in the database. Now how do i view this data which are getting stored in this database ?? I want to list all the data stored in database. I am using Berkeley db. And using dictionary i am storing…
Jeremy
  • 73
  • 1
  • 3
  • 10