Skip to main content

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}])

Metadata

Release files for dingdb 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dingdb 0.0.2
File Size Uploaded
dingdb-0.0.2.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dingdb 0.0.2
File Interpreter ABI Platform
dingdb-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / dingdb-0.0.2.tar.gz

Download URL dingdb-0.0.2.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
79aebb08d62c9ac1eaed2070db94979721109f41cfcc3dcafc076697d79ecbff
BLAKE2b-256 checksum
How to use checksums
c6748fade45a8f2441ee21712f6a70415f1aa0829aaddcd853eb355116e9663d
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / dingdb-0.0.2-py3-none-any.whl

Download URL dingdb-0.0.2-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
765fa3ed3e40f1861b87e46d26031cfcfad83d8091599cbb5a976679a9b8b50e
BLAKE2b-256 checksum
How to use checksums
a10497ae508b235dc75450984205c44cfe75997037ad052fe4abf9b937ad8b76
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page