A Redis client for Gleam https://hex.pm/packages/radish
Find a file
Iaroslav Belozerov bbbc8ce14f
bump version
2026-02-06 06:48:09 +01:00
.github/workflows trying to fix ci 2026-02-05 16:30:03 +01:00
src trying to fix ci 2026-02-05 16:30:03 +01:00
test feat: use lifeguard for connection pooling 2025-01-03 17:32:29 +00:00
.gitignore initial 2023-11-04 23:27:37 +03:30
banner.jpg initial 2023-11-04 23:27:37 +03:30
commit bump version 2026-02-06 06:48:09 +01:00
gleam.toml bump version 2026-02-06 06:48:09 +01:00
icon.png initial 2023-11-04 23:27:37 +03:30
LICENSE added LICENSE 2023-11-12 13:58:04 +03:30
manifest.toml migrate to newer versions, fix unauthed pool connections 2026-02-04 19:23:31 +01:00
README.md update readme 2026-02-05 16:16:36 +01:00

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

Package Version Hex Docs

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)
}