ddb3cython

A serviceless sql interface for flat files written in cython


Keywords
database, delimited-data, flat-file, python, sql
License
CC-BY-NC-SA-2.5
Install
pip install ddb3cython==1.4.262

Documentation

ddb (delimited database)

A serviceless sql interface for flat files written in python

What does it do?

  • ddb sits on top of text files, giving them a database access layer
  • you can read, write, update csv's or any type of delimited text file via sql

What are the human benifits to using ddb?

  • a common interface for all of your flat files
  • change control
  • access and modification logging
  • multiple points of integration (python, shell, slack, ansible)
  • sql is easy to work with, no coding required
  • the text file stays the same
  • wont break or affect anything that might use the file

What are the technical benifits to using ddb?

  • it does not run as a service, nothing to maintain
  • it can run on any server with python 2.7>
  • low memory foot print. it reads data 1 line at a time
  • eases the effort of data migration using sql
  • the text file does not change
  • accessibility of the text file doesnt change
  • ease of automation
  • error handeling for bad data
  • event logging
  • no caching at all, all access is live
  • optimized for speed using cython

How do I use it?

Where do I get it?

How do I install it?

The github repo is where I work. Stable releases should be downloaded from pypi.

pip install ddb --user

If you dont want to quote everything in shell

  • disable globing for ddb

BASH

   echo "alias ddb='set -f;ddb';ddb(){ command ddb "$@";set +f;}" >~/.bashrc

Getting started

dev stuff

ddb WorkFlow

Workflow

BASH Demo

Demo

ddb 30 forks, 1 file with locking

Demo

DDB Icon

DDB

Will you help me?

Sure, within reason and ability. Just contact me