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 details)
Built Distribution
File details
Details for the file jkeydb-0.0.1.tar.gz
.
File metadata
- Download URL: jkeydb-0.0.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 951d64ef99113865a997fda6b337d86520f8f56da4b0f32fb7b0cdbd4a1e0e9d |
|
MD5 | 7ab2a5ffd49df56afc027268968176a6 |
|
BLAKE2b-256 | be5b38d1e2c80eb3f32a9c3d7aea77d32d17db81dd0535893280d207ffc652e3 |
File details
Details for the file jkeydb-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: jkeydb-0.0.1-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccea2b7d50fd4a6cdf0de2880f5d4f4234a926b9c0da5781da7009379028d3aa |
|
MD5 | 4013042613d58c1f54a8a5ff06d70822 |
|
BLAKE2b-256 | 4b7506656a10feac48443a0f9f42d978b1d3e22ae25bad544833f78c7ca75fc0 |