All Projects → seladb → pickledb-rs

seladb / pickledb-rs

Licence: MIT License
PickleDB-rs is a lightweight and simple key-value store. It is a Rust version for Python's PickleDB

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to pickledb-rs

AloeDB
Light, Embeddable, NoSQL database for Deno 🦕
Stars: ✭ 111 (-4.31%)
Mutual labels:  nosql, db, nosql-database
Stampede
The ToroDB solution to provide better analytics on top of MongoDB and make it easier to migrate from MongoDB to SQL
Stars: ✭ 1,754 (+1412.07%)
Mutual labels:  nosql, nosql-database
Ardb
A redis protocol compatible nosql, it support multiple storage engines as backend like Google's LevelDB, Facebook's RocksDB, OpenLDAP's LMDB, PerconaFT, WiredTiger, ForestDB.
Stars: ✭ 1,707 (+1371.55%)
Mutual labels:  nosql, nosql-database
Tiedot
A rudimentary implementation of a basic document (NoSQL) database in Go
Stars: ✭ 2,643 (+2178.45%)
Mutual labels:  nosql, db
Android Nosql
Lightweight, simple structured NoSQL database for Android
Stars: ✭ 284 (+144.83%)
Mutual labels:  nosql, db
Xodus
Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.
Stars: ✭ 864 (+644.83%)
Mutual labels:  nosql, db
Db
Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.
Stars: ✭ 2,832 (+2341.38%)
Mutual labels:  nosql, db
Tendis
Tendis is a high-performance distributed storage system fully compatible with the Redis protocol.
Stars: ✭ 2,295 (+1878.45%)
Mutual labels:  nosql, kv
acebase
A fast, low memory, transactional, index & query enabled NoSQL database engine and server for node.js and browser with realtime data change notifications
Stars: ✭ 288 (+148.28%)
Mutual labels:  nosql, nosql-database
simpledbm
SimpleDBM is an Open Source Multi-Threaded Embeddable Transactional Database Engine in Java.
Stars: ✭ 51 (-56.03%)
Mutual labels:  nosql, nosql-database
pocket-db
🎒 A pocket-sized Node.js, NoSQL database.
Stars: ✭ 15 (-87.07%)
Mutual labels:  nosql, nosql-database
location-api-sl
This API can be use to all developers to get location details of Sri Lanka 🇱🇰 including major cities, sub areas, districts and Provinces. ⛳️
Stars: ✭ 35 (-69.83%)
Mutual labels:  nosql, nosql-database
skytable
Skytable is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and TLS
Stars: ✭ 696 (+500%)
Mutual labels:  nosql, nosql-database
Sql Boot
Advanced REST-wrapper for your SQL-queries (actually not only SQL)
Stars: ✭ 51 (-56.03%)
Mutual labels:  nosql, db
MongoDB-University
Repo for All MongoDB University Courses
Stars: ✭ 102 (-12.07%)
Mutual labels:  nosql, nosql-database
soda-for-java
SODA (Simple Oracle Document Access) for Java is an Oracle library for writing Java apps that work with JSON (and not only JSON!) in the Oracle Database. SODA allows your Java app to use the Oracle Database as a NoSQL document store.
Stars: ✭ 61 (-47.41%)
Mutual labels:  nosql, nosql-database
in-memoriam
Lightweight, super fast, atomic, transactional in-memory database
Stars: ✭ 13 (-88.79%)
Mutual labels:  lightweight, nosql
lwow
Lightweight onewire protocol library optimized for UART hardware on embedded systems
Stars: ✭ 98 (-15.52%)
Mutual labels:  lightweight
manon
🧪 Play with SpringBoot 2, JWT, Querydsl, GraphQL, Docker, ELK, PostgreSQL, MariaDB, Redis, MongoDB, Flyway, Maven, Gradle, TestNG, JUnit5, JaCoCo, GreenMail, CI, Quality Gates, Prometheus, Gatling, etc.
Stars: ✭ 26 (-77.59%)
Mutual labels:  nosql
kvs
Highly available distributed strong eventual consistent and sequentially consistent storage with search
Stars: ✭ 15 (-87.07%)
Mutual labels:  nosql

PickleDB

Build Status Rust test Rust audit Crate API

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::{PickleDb, PickleDbDumpPolicy, SerializationMethod};

fn main() {

    // create a new DB with AutoDump (meaning every change is written to the file)
    // and with Json serialization (meaning DB will be dumped to file as a Json object)
    let mut db = PickleDb::new("example.db", PickleDbDumpPolicy::AutoDump, SerializationMethod::Json);

    // set the value 100 to the key 'key1'
    db.set("key1", &100).unwrap();

    // print the value of key1
    println!("The value of key1 is: {}", db.get::<i32>("key1").unwrap());

    // load the DB from the same file
    let db2 = PickleDb::load("example.db", PickleDbDumpPolicy::DumpUponRequest, SerializationMethod::Json).unwrap();

    // print the value of key1
    println!("The value of key1 as loaded from file is: {}", db2.get::<i32>("key1").unwrap());
}

Installation

This crate works with Cargo and can be found in crates.io Add this to your Cargo.toml:

[dependencies]
pickledb = "0.4.1"

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.4.1

  • Bump up dependencies versions to fix vulnerabilities found in few of them

Version 0.4.0

  • Changed all doc tests from ignore to no_run so generated docs don't contain untested warnings
  • Changed both instances of lextend to take iterators of references rather than a slice of values
  • Fixed bug in load_test()
  • Fixed rustfmt and clippy warnings
  • Added examples to Cargo.toml to allow them to be run via Cargo

Version 0.3.0

  • Added new serialization options. Now PickleDB supports JSON, Bincode, YAML and CBOR serializations
  • Added proper error handling (Issue #3)
  • Use Path and PathBuf instead of strings to describe DB paths
  • Better organization of the code

Version 0.2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].