Skip to main content

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


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.4.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

kudb-0.1.4-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

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