Database system written in python for small applications that want to store small ammounts of data (0-30k rows). Parsing file, searching and changing couple rows in table with 30k rows takes around 0.3 second.
Small query language based on python conditions. Dependancy free. Object oriented.
Current version: 0.1
Copyright (c) 2006, IF Research Polska (http://www.ifresearch.pl)
Examples of usage:
from ocfdb import ocfdb, OCFDBError
# packages file format:
# file is packed with gzip
# $: gzip packages
# /\ this will output packages.gz
# database initialization
db = ocfdb('packages.gz')
print "Database Error", OCFDBError
# getting rows, this will return rows internal IDs in list, not column values nor objects
rowids = db.packages.getrows('int(__row.id) <= 2') # we have to remember that all columns values are strings
# to get objects we have to fetch them from database:
rows = db.packages.getrowsbyId(rowids)
#now when we have rows we can do something on them:
for row in rows:
print row.name, row.version
# let's now update name column in first row
rows.name = "clamav"
# returns: clamav
# so when we do any changes, we have to save database, so they won't be lost at another opening of database
These details are provided for information only. No information here is legal advice and should not be used as such.