A simple key-value database in python.
Project description
A simple key-value database in python.
Installation
pip install pykvdb
Usage:
from pykvdb import KVDB
import os
# set db file path, default is './pykvdb'
dbpath = os.path.join(os.path.split(os.path.realpath(__file__))[0], 'kvdb')
# set db file maxsize, default is 10M
dbsize = 10 * 1024 * 1024
with KVDB(path=kvpath, size=dbsize) as kv:
kv.set('a', 'test')
# get value
with KVDB(path=kvpath, size=dbsize) as kv:
print(kv.get('a'))
# scan all key-value
with KVDB(path=kvpath, size=dbsize) as kv:
cur = kv.cursor()
for k, v in cur:
print(k.decode(), v.decode())
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
pykvdb-0.1.3.tar.gz
(3.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pykvdb-0.1.3.tar.gz.
File metadata
- Download URL: pykvdb-0.1.3.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37adc840e3f212b9c328db3ddc709d6437e1d7578da226df54f7569f26d77d5b
|
|
| MD5 |
68f7caf73aadd29b08be9a2297455a20
|
|
| BLAKE2b-256 |
9706d958462623bc653c4bf0984ec88f5d1ecc28ad8eb4dbc16a1acb35d51028
|
File details
Details for the file pykvdb-0.1.3-py2.py3-none-any.whl.
File metadata
- Download URL: pykvdb-0.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef9a87ad71748f69f9017ae7a794ce30270d600c4e8202b721f8f5033032c097
|
|
| MD5 |
c51272b7fc58d5f39fa7a44311d579c5
|
|
| BLAKE2b-256 |
dc37795a2837a69b3cf71a290683202ec5bd6e860f97d86f77c8c198fffe6c91
|