Simple Key-Value Store with a Consistent API across All Platforms.
PolyKV is an ultra-lightweight, unified Key-Value store that works out of the box. It uses the native storage mechanism of each platform (no compiled core) while providing a consistent API across 12+ languages.
-
🚀 Start in Seconds Zero configuration required. No setup code, no init flags, no hassle. Just import and use.
-
🧬 Native DNA Built with 100% standard libraries. No heavy C++ cores, no binary dependencies, no compilation headaches.
-
🦄 One API, Everywhere Write once, run anywhere. Whether you are on Node.js, Flutter, Go, or Python, the API is identical.
-
📦 Auto-Magic Storage Objects, Arrays, and Numbers are automatically serialized to JSON and securely stored.
| Language | Verified Runtime (✅) | Build Only (🛠) |
|---|---|---|
| TypeScript | CLI (Node.js), Browser, React Native (iOS/Android) | - |
| Dart | Flutter (iOS/Android/macOS), CLI | - |
| Go | macOS, Linux, Windows, iOS, Android, CLI | - |
| Rust | macOS, iOS, Android, CLI | Linux, Windows |
| Swift | iOS, macOS, CLI | - |
| C++ | macOS, iOS, Android, CLI | - |
| Python | CLI, Web, Android | - |
| Kotlin | CLI, Web, Android | - |
| C# | CLI | Android, Windows |
| Java | CLI, Android | - |
| Ruby | CLI | - |
| PHP | CLI | - |
✅ Runtime Verified: Full CRUD operations verified via automated tests on actual devices/simulators.
import { PolyKV } from 'polykv';
const db = new PolyKV("UserPrefs");
// Set data (Async)
await db.setString("theme", "dark");
await db.setMap("profile", { name: "Alice", age: 30 });
// Get data
const theme = await db.getString("theme");
console.log(theme, profile);Python (Async & Sync)
Async:
import asyncio
from polykv import PolyKV
async def main():
db = PolyKV("MyApp")
await db.set_string("status", "active")
print(await db.get_string("status"))
asyncio.run(main())Sync:
from polykv import PolyKVSync
def main():
db = PolyKVSync("MySyncApp")
db.set_string("status", "active")
print(db.get_string("status"))
main()Go
package main
import "github.com/my/polykv"
func main() {
kv, _ := polykv.New("MyApp")
kv.SetNumber("retries", 5)
val, _ := kv.GetNumber("retries")
}Dart (Flutter)
import 'package:polykv/polykv.dart';
void main() async {
final kv = await PolyKV.init("MyApp");
await kv.setBool("isDarkMode", true);
}Rust
use polykv::PolyKV;
#[tokio::main]
async fn main() {
let kv = PolyKV::new("MyApp");
kv.set_string("key", "value").await.unwrap();
}Swift
let kv = PolyKV("MyApp")
await kv.setString("token", "xyz-123")Kotlin
val kv = PolyKV("MyApp", context.filesDir)
kv.setString("token", "123")C#
var kv = new PolyKV("MyApp");
kv.SetString("mode", "prod");Unless configured otherwise, data is stored in standard OS locations:
- macOS:
~/Library/Preferences/<AppName>/<AppName>.json - Windows:
%APPDATA%\<AppName>\<AppName>.json - Linux:
~/.config/<AppName>/<AppName>.json - Mobile: SharedPreferences (Android) / NSUserDefaults (iOS)
- Web:
localStorage
For detailed verification instructions and platform-specific test commands, please refer to tests/README.md.
# Run verification suite (macOS)
./tests/run_full_suite.shCreated by PolyKV Team