Skip to main content

No project description provided

Project description

Dingdb, a thingdb like storage & retrieval Python API

Simple implementation of Thingdb, called Dingdb (German for 'thing') Currently expects a sqlite3 database.

Inspired by:

Installation

git clone git@github.com:chrisjsimpson/dingdb.git
cd dingdb/
pip3 install ./
python3 dingdb/migrations/1-create-dingdb-schema.py -up -db ./data.db

Usage

from dingdb import dingdb
from uuid import uuid4

dingdb.help() # See help

# Connect and insert data
tdb = dingdb(database='./data.db')
# Put things
tdb.putDing(1, 'person', 'person', data=[{'key':'name', 'value': 'Sam'}, {'key':'age', 'value':30}])
# Get a thing
person = tdb.getDing(1)
person.name 
'Sam'
person.age
'30'
person.age = 31
person.save()

# Get things by type
tdb.getDingsByType('person')

# More..

# Use a uuid for ids:
tdb.putDing(str(uuid4()), 'person', 'person', data=[{'key':'name', 'value': 'Sam'}, {'key':'age', 'value':30}])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dingdb, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size dingdb-0.0.2-py3-none-any.whl (4.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size dingdb-0.0.2.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page