SNKV – SQLite's B-tree as a key-value store (C/C++ and Python bindings)
SQLite has six layers: SQL parser → query planner → VDBE → B-tree → pager → OS. (https://sqlite.org/arch.html) For key-value workloads you only need the bottom three. SNKV cuts the top three layers and talks directly to SQLite's B-tree engine. No SQL strings. No query planner. No VM. Just put/get/delete on the same storage core that powers SQLite. Python: pip install snkv from snkv import KVStore with KVStore("mydb.db") as db: db["hello"] = "world" print(db["hello"]) # b"world" C/C++ (single-header, drop-in): #define SNKV_IMPLEMENTATION #include "snkv.h" KVStore…
In plain words
SNKV is a key-value store that bypasses SQLite's SQL layers to access its B-tree engine directly, available for C/C++ and Python. It eliminates query parsing, planning, and virtual machine overhead for simple put, get, and delete operations on the same storage core SQLite uses. Benchmarks show 57–104% performance improvements over SQLite's WITHOUT ROWID mode on sequential writes, random reads, scans, updates, deletes, and existence checks.
written from the facts on this page · September 2026
From the sources
In the maker’s words, at launch
SQLite has six layers: SQL parser → query planner → VDBE → B-tree → pager → OS. (https://sqlite.org/arch.html) For key-value workloads you only need the bottom three. SNKV cuts the top three layers and talks directly to SQLite's B-tree engine. No SQL strings. No query planner. No VM. Just put/get/delete on the same storage core that powers SQLite. Python: pip install snkv from snkv import KVStore with KVStore("mydb.db") as db: db["hello"] = "world" print(db["hello"]) # b"world" C/C++ (single-header, drop-in): #define SNKV_IMPLEMENTATION #include "snkv.h" KVStore *db; kvstore_open("mydb.db", &db, KVSTORE_JOURNAL_WAL); kvstore_put(db, "key", 3, "value", 5); Benchmarks vs SQLite WITHOUT ROWID (1M records, identical settings): Sequential writes +57% Random reads +68% Sequential scan +90% Random updates +72% Random deletes +104% Exists checks +75% Mixed workload +84% Bulk insert +10% Honest tradeoffs: - LMDB beats it on raw reads (memory-mapped) - RocksDB beats it on write-heavy workloads (LSM-tree) - sqlite3 CLI won't open the database (schema layer is bypassed by design) What you get: ACID, WAL concurrency, column families, crash safety — with less overhead for read-heavy KV workloads.
More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 1d ago · opentrailpaper.com
