Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/massivefermion/radish
A Redis client for Gleam
https://github.com/massivefermion/radish
Last synced: 17 days ago
JSON representation
A Redis client for Gleam
- Host: GitHub
- URL: https://github.com/massivefermion/radish
- Owner: massivefermion
- License: apache-2.0
- Created: 2023-11-04T19:58:35.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-12T17:01:48.000Z (30 days ago)
- Last Synced: 2024-11-12T18:18:22.895Z (30 days ago)
- Language: Gleam
- Homepage: https://hex.pm/packages/radish
- Size: 690 KB
- Stars: 33
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gleam - radish - [📚](https://hexdocs.pm/radish/) - A Redis client for Gleam (Packages / Databases)
README
![radish](https://raw.githubusercontent.com/massivefermion/radish/main/banner.jpg)
[![Package Version](https://img.shields.io/hexpm/v/radish)](https://hex.pm/packages/radish)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/radish/)# radish
A Gleam client for Valkey, KeyDB, Redis and other tools with compatible APIs
## Quick start
```sh
gleam test # Run the tests
gleam shell # Run an Erlang shell
```## Installation
```sh
gleam add radish
```## Usage
```gleam
import radish
import radish/listpub 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)
}
```