Simple Document database Library
Project description
kudb
simple document database for python
Features
- Simple and convenient Document database and Key-value Store Library
- Easy to install (Use SQLite for the back end)
Installation
$ python3 -m pip install kudb
Repository
Simple sample
document database sample:
import kudb
# connect to file database
kudb.connect('test.db')
# insert
kudb.insert({'name': 'Tako', 'age': 18})
kudb.insert({'name': 'Ika', 'age': 19})
# get data
for row in kudb.get_all():
print(row)
# get data by id
print(kudb.get(id=1)) # show 1st row
# close
kudb.close()
key-value store sample:
import kudb
# connect to file database
kudb.connect('test.db')
# set_key
kudb.set_key('hoge', 1234)
# get_key
print(kudb.get_key('hoge'))
# get default value
print(kudb.get_key('hoge_1st', 'not exists'))
# close
kudb.close()
functions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kudb-0.1.11.tar.gz
(6.5 kB
view hashes)
Built Distribution
kudb-0.1.11-py3-none-any.whl
(6.6 kB
view hashes)