0
I Use This!
Activity Not Available

Project Summary

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.

Features:

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:
# MODIFYDATE:123456789:
# TABLE:packages:
# id;name;version
# 1;clamav;2.0
# 2;dspam;3.6.4

# file is packed with gzip
# $: gzip packages
# /\ this will output packages.gz

# database initialization
try:
db = ocfdb('packages.gz')
except OCFDBError:
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[0].name = "clamav"

print rows[0].name
# returns: clamav

# so when we do any changes, we have to save database, so they won't be lost at another opening of database

db.savedatabase()

Tags

csv database objectoriented python

In a Nutshell, ocfdb...

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

BSD 4-clause (University of California-Specific)
Permitted

Place Warranty

Commercial Use

Modify

Distribute

Forbidden

Hold Liable

Use Trademarks

Required

Include Copyright

Include License

These details are provided for information only. No information here is legal advice and should not be used as such.

All Licenses

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    Black Duck offers a free trial so you can discover if there are open source vulnerabilities in your code
  • ...
    anyone with an Open Hub account can update a project's tags
  • ...
    65% of companies leverage OSS to speed application development in 2016
  • ...
    by exploring contributors within projects, you can view details on every commit they have made to that project

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

Community Rating

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!
Sample ohloh analysis