Crates.io | kvstore |
lib.rs | kvstore |
version | 0.2.1 |
source | src |
created_at | 2023-12-26 22:08:28.602257 |
updated_at | 2024-02-21 18:22:37.434633 |
description | A simple, typesafe key-value store, that allows users to set, get, and delete key-value pairs, with each key stored in a separate file on disk. |
homepage | https://patbeagan.dev |
repository | https://github.com/patbeagan1/Open-Source-Requests |
max_upload_size | |
id | 1081221 |
size | 43,455 |
This tool is a simple yet powerful key-value store, implemented in Rust. It allows users to set, get, and delete key-value pairs, with each key stored in a separate file on disk. Inspired by Android's Shared Preferences, it supports different data types like String
, Integer
, and Float
.
cargo install kvstore
c
Ensure you have Rust and Cargo installed on your system. Follow these steps to install:
git clone [repository-url]
cd my_kv_store
cargo build --release
After building the project, you can run the tool using the Cargo run command followed by the operation you want to perform.
cargo run -- set <key> <value> [--type <type>]
<key>
: The key for the value.<value>
: The value to store.<type>
: The type of the value (String
, Integer
, Float
). Default is String
.Using set
will infer a type for the value. If you want to specify the value, you can use one of the following instead:
setString
setInteger
setFloat
cargo run -- get <key>
<key>
: The key of the value to retrieve.Using get
will return the type as well as the value - something like String:hello
. If you want to specify the value, you can use one of the following instead:
getString
getInteger
getFloat
cargo run -- delete <key>
<key>
: The key of the value to delete.Contributions to this project are welcome! Feel free to fork the repository and submit pull requests.
This project is licensed under The MIT License
- see the LICENSE file for details.