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.

Source Distribution

dingdb-0.0.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

dingdb-0.0.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file dingdb-0.0.2.tar.gz.

File metadata

  • Download URL: dingdb-0.0.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for dingdb-0.0.2.tar.gz
Algorithm Hash digest
SHA256 79aebb08d62c9ac1eaed2070db94979721109f41cfcc3dcafc076697d79ecbff
MD5 2abcc1d9bac897f271ff254116f21aeb
BLAKE2b-256 c6748fade45a8f2441ee21712f6a70415f1aa0829aaddcd853eb355116e9663d

See more details on using hashes here.

File details

Details for the file dingdb-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: dingdb-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for dingdb-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 765fa3ed3e40f1861b87e46d26031cfcfad83d8091599cbb5a976679a9b8b50e
MD5 ca84f020b4da1b305c5b66233a9abc87
BLAKE2b-256 a10497ae508b235dc75450984205c44cfe75997037ad052fe4abf9b937ad8b76

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page