Skip to content

polykv/polykv-go

Repository files navigation

PolyKV - Go

Go Version License Stars Platform

Native Key-Value Store for Go.

A robust, embedded JSON store for Go applications. It brings the simplicity of persistent key-value storage to your CLI tools and desktop apps without the weight of CGO or SQLite.

One API, Everywhere. This library is part of the PolyKV ecosystem. Use the same consistent API across 12+ languages.

✨ Why PolyKV Go?

  • 🐹 Idiomatic Go Simple, explicit error handling and strong typing. Fits naturally into your Go codebase.

  • 🔒 Safe & Robust Handles file locking and atomic writes to ensure your data stays consistent, even if the app crashes.

  • 🚀 Cross-Compilation Friendly Pure Go implementation. Cross-compile for Linux, macOS, and Windows with zero hassle.

📦 Installation

go get github.com/your-username/polykv

🚀 Usage

Complete Workflow

package main

import (
	"fmt"
	"log"
	"github.com/your-username/polykv"
)

func main() {
	// Initialize with error checking
	kv, err := polykv.New("MyCLI")
	if err != nil {
		log.Fatal(err)
	}

	// 1. Save (Set)
	kv.SetString("env", "production")
	kv.SetNumber("port", 8080)

	// 2. Read (Get)
	env, _ := kv.GetString("env")
	fmt.Printf("Env: %s\n", env)

	// 3. Update
	kv.SetString("env", "staging")

	// 4. Delete
	kv.Remove("port")

	// 5. Clear All
	kv.Clear()
}

🌍 Platform Support

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.

📜 License

MIT

About

Zero-Config, Native Key-Value Store for Go

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages