A single-file database storages key-value pairs.
Project description
- Install:
pip install kiwilite
- Usage:
import kiwilite
with kiwilite.Open(‘<path-to-db-file>’) as storage:
# Set map data of key and value and save storage file. storage.Set({‘<key>’: ‘<value>’})
# Get value bytes of key. <value> = storage.Get(‘<key>’)
# Log: a list of timestones. [<list>, <of>, <timestones>] = storage.Log(<start-timestamp>, <end-timestamp>)
# Rollback to the last timestone before timestamp, # and clear all data after timestamp. storage.Rollback(<timestamp>)
# Lighten to the first timestone after timestamp, # and clear all invalid data before timestamp. # Data will not lose, but cannot rollback before timestamp. storage.Lighten(<timestamp>)
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
File details
Details for the file kiwilite-0.0.1.tar.gz
.
File metadata
- Download URL: kiwilite-0.0.1.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
66194df234176906c77fb758bc0b0113b0c35f7b76cce1ae9bd5db98237d4a9d
|
|
MD5 |
047ba6dd4d75c5cb2648b8932c68159c
|
|
BLAKE2b-256 |
7c3a2931972ab90975d76fecef0b1193972794adfef5e22b5d60f45e02a70a98
|