dbkit

Software Screenshot:
dbkit
Software Details:
Version: 0.2.2
Upload Date: 20 Feb 15
Developer: Keith Gaughan
Distribution Type: Freeware
Downloads: 19

Rating: nan/5 (Total Votes: 0)

dbkit is a Python library that abstracts away at least part of the pain involved in dealing with DB-API 2 compatible database drivers.

from dbkit import connect, query
from contextlib import closing
import sqlite3

with connect(sqlite3, 'counters.db') as ctx, closing(ctx):
 for counter, value in query('SELECT counter, value FROM counters'):
 print "%s: %d" % (counter, value)


Overview

dbkit is intended to be used in circumstances where it is impractical or overkill to use an ORM such as SQLObject or SQLAlchemy, but it would be useful to at least abstract away some of the pain involved in dealing with the database.

Features:

  • Rather than passing around database connections, statements are executed within a database context, thus helping to decouple modules that interface with the database from the database itself and its connection details.
  • Database contexts contain references to the exceptions exposed by the database driver, thus decoupling exception handling from the database driver.
  • Easier to use transaction handling.
  • Easier iteration over resultsets.
  • Connection pooling. In addition, any code using pooled connections has no need to know connection pooling is in place.
  • Query logging.

Requirements:

  • Python

Similar Software

MyJgui
MyJgui

20 Feb 15

Orbada
Orbada

14 Apr 15

DataVision
DataVision

3 Jun 15

Cdcat
Cdcat

20 Feb 15

Other Software of Developer Keith Gaughan

uwhoisd
uwhoisd

20 Feb 15

Comments to dbkit

Comments not found
Add Comment
Turn on images!