Skip to content

polykv/polykv-csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PolyKV - C# (.NET)

NuGet version License Stars Platform

Universal Key-Value Store for .NET 8, MAUI, and Blazor.

A truly universal persistence library for the .NET ecosystem. Whether you are building a cross-platform mobile app with MAUI, a web app with Blazor WASM, or a microservice, PolyKV works everywhere.

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

✨ Why PolyKV .NET?

  • 👾 MAUI Ready First-class support for Android, iOS, macOS, and Windows targets via MAUI.

  • 🌐 Blazor Compatible Running in the browser? PolyKV transparently bridges to localStorage via JS Interop.

  • ⚡️ JSON Core Uses System.Text.Json for high-performance, allocation-free serialization.

📦 Installation

dotnet add package PolyKV

🚀 Usage

Complete Example

using PolyKV;

public class Program
{
    public static void Main(string[] args)
    {
        // Init
        var kv = new PolyKV("MySuperApp");

        // 1. Save
        kv.SetString("language", "en-US");
        kv.SetNumber("retries", 3);

        // 2. Read
        string lang = kv.GetString("language");
        Console.WriteLine($"Lang: {lang}");

        // 3. Update
        kv.SetNumber("retries", 5);

        // 4. Delete
        kv.Remove("language");

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

📂 Storage Strategy

  • Mobile: Uses Context.FilesDir (Android) and NSUserDefaults (iOS).
  • Desktop: Uses %APPDATA% (Windows) and ~/.config (Mac/Linux).

🌍 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 C#

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages