Skip to main content

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


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

Uploaded Source

Built Distribution

jkeydb-0.2.0-py3-none-any.whl (2.2 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