This repository contains example code with HPKV in multiple programming languages.
examples/
├── atomic-inc/ # Atomic increment operations
├── basic-crud/ # Basic CRUD operations
├── range-queries/ # Range query operations
└── web-sockets/ # WebSocket-based operations
Each example category is available in multiple programming languages:
- C# (.NET)
- Go
- Java
- JavaScript (Node.js)
- Python
Demonstrates fundamental Create, Read, Update, and Delete operations with HPKV.
- Create new records
- Read existing records
- Update record values
- Delete records
- Verify operations
Shows how to perform atomic increment/decrement operations on numeric values.
- Create a counter
- Increment values atomically
- Decrement values atomically
- Handle concurrent operations safely
Demonstrates how to efficiently query multiple records within a key range.
- Create sample records with sequential keys
- Perform basic range queries
- Use range queries with limits
- Filter results based on record values
Shows how to use HPKV's WebSocket API for real-time operations.
- WebSocket-based communication
- Full CRUD operations support
- Automatic reconnection handling
- Message correlation
- SSL/TLS support
- API key authentication
Before running any of the examples, you'll need:
- An HPKV API key
- The HPKV base URL for your instance
- The appropriate runtime/SDK for your chosen language:
- C#: .NET 9.0 or later
- Go: Go 1.16 or later
- Java: Java 11 or later
- JavaScript: Node.js 16 or later
- Python: Python 3.7 or later
- Clone this repository
- Navigate to your chosen example and language
- Follow the setup instructions in the example's README.md
- Configure your HPKV credentials (API key and base URL)
This project is licensed under the MIT License - see the individual example directories for details.