PickleDB
PickleDB is a lightweight and simple key-value store written in Rust, heavily inspired by Python's PickleDB
PickleDB is fun and easy to use
use PickleDb;
Installation
This crate works with Cargo and can be found in crates.io
Add this to your Cargo.toml
:
[]
= "0.2.0"
Documentation
All documentation for this crate can be found in docs.rs
Examples
There are currently two examples shipped with PickleDB:
- Hello World which shows the basic usage of PickleDB: create a new DB, load a DB from file, get/set key-value pairs of different types, and more
- Lists which shows how to use lists in PickleDB: create new lists, add/remove items from lists, retrieve items from lists, remove lists, and more
Changelog
Version 0.2.0
- Dump the DB to file in a crash-safe manner using a temp file (Thanks jamwt from Reddit for the tip: https://www.reddit.com/r/rust/comments/agumun/check_out_pickledb_a_lightweight_and_simple/ee987j0)
- Extend lists became easier and multiple calls to lcreate(), ladd() and lextend() can be chained
- Added an iterator over keys and values in the DB
- Added an iterator over items in a list