Native Key-Value Store for Python.
A lightweight, modern persistence layer. Perfect for CLI tools, bots, and small web services that need simple state management without a heavy database.
One API, Everywhere. This library is part of the PolyKV ecosystem. Use the same consistent API across 12+ languages.
-
⚡️ Flexible I/O Supports both
asynciofor modern apps and synchronous mode for simple scripts. -
🐍 Pure Python Zero binary dependencies. easy to install, easy to bundle, works everywhere Python works.
-
📂 XDG Compliant Automatically respects standard configuration paths (XDG on Linux, Library on macOS) so your app behaves like a good citizen.
pip install polykvimport asyncio
from polykv import PolyKV
async def main():
# Zero Config - just give it a namespace
db = PolyKV("BotConfig")
# 1. Save
await db.set_string("token", "secret-123")
await db.set_number("retries", 5)
# 2. Read
token = await db.get_string("token")
print(f"Token: {token}")
# 3. Clear
await db.clear()
if __name__ == "__main__":
asyncio.run(main())from polykv import PolyKVSync
def main():
db = PolyKVSync("MyScript")
db.set_string("mode", "batch")
print(db.get_string("mode"))
if __name__ == "__main__":
main()- macOS:
~/Library/Preferences/BotConfig/BotConfig.json - Linux:
~/.config/BotConfig/BotConfig.json - Windows:
%APPDATA%\BotConfig\BotConfig.json
| 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.
MIT