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 details)

Uploaded Source

Built Distribution

jkeydb-0.2.0-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file jkeydb-0.2.0.tar.gz.

File metadata

  • Download URL: jkeydb-0.2.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for jkeydb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ca01d2a9c41a688e3be24156d5c08533cc2f93121b3cc0f93f32bd223ae1929f
MD5 86d123b34ba6798f7479b2f45279c23c
BLAKE2b-256 40fc2ba15debd4488ebf0f0d3ced52dafba7e3471bb621088b4b617f50474374

See more details on using hashes here.

File details

Details for the file jkeydb-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: jkeydb-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for jkeydb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 feb651997d36c12dfe62c2892398b0c34d24e60eecee31c0f67c974993ac4fa8
MD5 f6a9a05d37aaac50e9d38b9755a32243
BLAKE2b-256 7137738c9bcc70f1392581c1bf99fcb64b48308cbc04c2d2984f572584221959

See more details on using hashes here.

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