#key-value-store #kv #database #command-line-tool #key-set #set-key #cli

bin+lib rskey

A simple persistent key-value store that wraps HashMap, with a basic CLI tool to list, get, and set key-value pairs

5 releases (3 breaking)

0.4.0 Nov 5, 2024
0.3.0 Aug 16, 2024
0.2.0 Jun 23, 2024
0.1.1 May 26, 2024
0.1.0 May 26, 2024

#1294 in Command line utilities

Download history 113/week @ 2024-08-10 51/week @ 2024-08-17 12/week @ 2024-09-14 13/week @ 2024-09-21 17/week @ 2024-09-28 1/week @ 2024-10-05 109/week @ 2024-11-02 12/week @ 2024-11-09 6/week @ 2024-11-16 2/week @ 2024-11-23

129 downloads per month

MIT/Apache

16KB
152 lines

Crate Docs CI Audit Maintenance

rskey

A simple persistent key-value store that wraps HashMap.

Getting started

use rskey::Store;

let mut s = Store::open(path)?;
s.insert("key1".to_string(), "value1".to_string());
assert_eq!(s.get("key1").unwrap(), "value1");
s.sync()?;

A basic CLI tool is also included to list, get, and set key-value pairs.

Installation

cargo install rskey

Usage

The rskey tool expects to find a data file named store.kv in the current directory. If there is no such file, one will be created as soon as you set a key.

Listing all data

rskey list
key1: value1
key2: value2

Getting a value by key

rskey get key1
key1: value1

Setting a key-value pair

rskey set key3 value3

Current version: 0.4.0

License: MIT OR Apache-2.0

Dependencies

~0.8–1.7MB
~36K SLoC