TinyKV.Client 1.0.0

dotnet add package TinyKV.Client --version 1.0.0
                    
NuGet\Install-Package TinyKV.Client -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TinyKV.Client" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TinyKV.Client" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="TinyKV.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TinyKV.Client --version 1.0.0
                    
#r "nuget: TinyKV.Client, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=TinyKV.Client&version=1.0.0
                    
Install TinyKV.Client as a Cake Addin
#tool nuget:?package=TinyKV.Client&version=1.0.0
                    
Install TinyKV.Client as a Cake Tool

🚀 TinyKV.Client - Lightweight SignalR Client for TinyKV

TinyKV.Client is a lightweight C# SignalR client designed to interact with a running TinyKV Server. It provides an easy-to-use API for real-time key-value operations over SignalR, supporting both single and batch operations.


📦 Installation

To use TinyKV.Client, install it via NuGet:

dotnet add package TinyKV.Client --version 1.0.0

Or manually add it to your .csproj:

<PackageReference Include="TinyKV.Client" Version="1.0.0" />

🔹 Prerequisites

  • A running TinyKV Server (Ensure you have access to an active TinyKV instance).
  • The server should be accessible via a SignalR endpoint at:
    http://localhost:5009/tinykv
    

⚙️ Usage

1️⃣ Initialize the Client

Connect to a running TinyKV Server:

var client = new TinyKVClient("http://localhost:5009/tinykv");
await client.StartAsync();

2️⃣ Perform Key-Value Operations

Set a Value
await client.SetAsync("username", "Alice");
Get a Value
string value = await client.GetAsync("username");
Console.WriteLine(value); // Alice
Check if a Key Exists
bool exists = await client.HasAsync("username");
Delete a Key
bool deleted = await client.DeleteAsync("username");
Clear All Keys
await client.ClearAsync();

🔄 Batch Operations

Set multiple values:

await client.SetBatchAsync(new Dictionary<string, string>
{
    { "key1", "value1" },
    { "key2", "value2" }
});

Retrieve multiple values:

var values = await client.GetBatchAsync(new List<string> { "key1", "key2" });

Check multiple keys:

bool[] exists = await client.HasBatchAsync(new List<string> { "key1", "key2" });

Delete multiple keys:

int deletedCount = await client.DeleteBatchAsync(new List<string> { "key1", "key2" });

📜 License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 97 2/28/2025

Initial release with single and batch operations.