a simple key-value database
Project description
jkeydb
a simple key-value database
how to install
pip install jkeydb
or
pip install git+https://github.com/duongtuan303030/jkeydb
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.3.0.tar.gz
(7.6 kB
view details)
Built Distribution
jkeydb-0.3.0-py3-none-any.whl
(10.4 kB
view details)
File details
Details for the file jkeydb-0.3.0.tar.gz
.
File metadata
- Download URL: jkeydb-0.3.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ab322e9d8c7d0cb34d43d16c715526b37eb0c515b6576dc62342c0e91cd1a6b |
|
MD5 | a1655bb66df6fb4853141de508ccd3b9 |
|
BLAKE2b-256 | 0053fc3c08db34fe478c40f4913eec4851d3bf2c3014c057884dcf85a63e5d51 |
File details
Details for the file jkeydb-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: jkeydb-0.3.0-py3-none-any.whl
- Upload date:
- Size: 10.4 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 | f0fc6af2aaf598f689da1853b89ccfa6cfa8dcae349f850145ca39a58efbe87a |
|
MD5 | f6c07c633c66bdad374e31227778f496 |
|
BLAKE2b-256 | 496c176fb259836fea13aa5018199e784764a7c1f936f0b0066906c8718eedde |