Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Coachonko/redis

a library for V programs to connect and interface with Redis-compatible databases
https://github.com/Coachonko/redis

Last synced: 3 months ago
JSON representation

a library for V programs to connect and interface with Redis-compatible databases

Awesome Lists containing this project

README

        

# redis

Redis library for the V language.

## Features

- RESP version 3 only
- [Commands](src/cmdable.v)
- Aumtomatic connection pool

## Usage

Install with `v install Coachonko.redis`

```V
import coachonko.redis

// Configure.
mut ro := redis.Options{
// refer to the options.v file
}

// Create a new client.
client := new_client(mut opts)

// Issue commands as Client methods.
// Supported commands are listed in the `cmdable.v` file.
mut result := client.set('test_key', 'test_value', 0)!

// Get the value from results
result = client.get('test_key')!
println(result.val())
```

## Notes

This library is developed against [KeyDB](https://github.com/Snapchat/KeyDB/), a multithreaded drop-in
replacement for Redis backed by [Snap](https://snap.com/).

Pull requests are very welcome. Please look at [CONTRIBUTING.md](./CONTRIBUTING.md) and at [TODO.md](./TODO.md)
files. Open issues for problems you encounter, reach out to me and the other contributors on [V's Discord](https://discord.gg/vlang).