Tech News
← Back to articles

Show HN: SNKV – SQLite's B-tree as a key-value store (C/C++ and Python bindings)

read original related products more articles

SNKV — a simple, crash-safe embedded key-value store

What is SNKV?

SNKV is a lightweight, ACID-compliant embedded key-value store built directly on SQLite's B-Tree storage engine — without SQL.

The idea: bypass the SQL layer entirely and talk directly to SQLite's storage engine. No SQL parser. No query planner. No virtual machine. Just a clean KV API on top of a proven, battle-tested storage core.

SQLite-grade reliability. KV-first design. Lower overhead for read-heavy and mixed key-value workloads.

Quick Start

Single-header integration — drop it in and go:

#define SNKV_IMPLEMENTATION #include "snkv.h" int main ( void ) { KVStore * db ; kvstore_open ( "mydb.db" , & db , KVSTORE_JOURNAL_WAL ); kvstore_put ( db , "key" , 3 , "value" , 5 ); void * val ; int len ; kvstore_get ( db , "key" , 3 , & val , & len ); printf ( "%.*s

" , len , ( char * ) val ); snkv_free ( val ); kvstore_close ( db ); }

Configuration

... continue reading