'Encapsulates working with a database.'

def __init__(self, db_file, timeout=BROKER_TIMEOUT, logger=None, account=None, container=None, pending_timeout=None, stale_reads_ok=False):

    self.conn = None
    self.db_file = db_file
    self.pending_file = (self.db_file + '.pending')
    self.pending_timeout = (pending_timeout or 10)
    self.stale_reads_ok = stale_reads_ok
    self.db_dir = os.path.dirname(db_file)
    self.timeout = timeout
    self.logger = (logger or logging.getLogger())
    self.account = account
    self.container = container
    self._db_version = (-1)
