a simple key-value database
Project description
jkeydb
a simple key-value database
how to use
from jkeydb import database
with database("file name") as kv:
#save items (support json and str and int)
kv["key"] = 32323
#load items
data = kv["key"]
print(data)
#get all key as list
data - kv.keys()
print(data)
#get all items as list
data - kv.items()
print(data)
#get all values as list
data - kv.values()
print(data)
#get all List keys with a prefix
data = kv.prefix("text key")
print(data)
#same as dict obj
no with
from jkeydb import database
kv = database("file name")
#save items (support json and str and int)
kv["key"] = 32323
#load items
data = kv["key"]
print(data)
#get all key as list
data - kv.keys()
print(data)
#get all items as list
data - kv.items()
print(data)
#get all values as list
data - kv.values()
print(data)
#get all List keys with a prefix
data = kv.prefix("text key")
print(data)
#save data
kv.close()
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
jkeydb-0.0.1.tar.gz
(2.4 kB
view hashes)
Built Distribution
jkeydb-0.0.1-py3-none-any.whl
(2.2 kB
view hashes)