TinyKV.Client
1.0.0
dotnet add package TinyKV.Client --version 1.0.0
NuGet\Install-Package TinyKV.Client -Version 1.0.0
<PackageReference Include="TinyKV.Client" Version="1.0.0" />
<PackageVersion Include="TinyKV.Client" Version="1.0.0" />
<PackageReference Include="TinyKV.Client" />
paket add TinyKV.Client --version 1.0.0
#r "nuget: TinyKV.Client, 1.0.0"
#addin nuget:?package=TinyKV.Client&version=1.0.0
#tool nuget:?package=TinyKV.Client&version=1.0.0
🚀 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 | Versions 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. |
-
net8.0
- Microsoft.AspNetCore.SignalR.Client (>= 9.0.2)
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.