A Redis client for Gleam
https://hex.pm/packages/radish
- Gleam 100%
| .github/workflows | ||
| src | ||
| test | ||
| .gitignore | ||
| banner.jpg | ||
| commit | ||
| gleam.toml | ||
| icon.png | ||
| LICENSE | ||
| manifest.toml | ||
| README.md | ||
Warning
This is an updated version of the supposedly unmainained massivefermion/radish
This is also a mirror from my forgejo
I'm not good at gleam, but this seems to work. Still, proceed with caution.
radish
A Gleam client for Valkey, KeyDB, Redis and other tools with compatible APIs
Quick start
gleam test # Run the tests
gleam shell # Run an Erlang shell
Installation
gleam add radish
Usage
import radish
import radish/list
pub fn main() {
let assert Ok(client) =
radish.start(
"localhost",
6379,
[radish.Timeout(128), radish.Auth("password")],
)
radish.set(client, "requests", "64", 128)
radish.expire(client, "requests", 60, 128)
radish.decr(client, "requests", 128)
list.lpush(
client,
"names",
["Gary", "Andy", "Nicholas", "Danny", "Shaun", "Ed"],
128,
)
list.lpop(client, "names", 128)
}
