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: 8 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-05-16T06:07:46.000Z (6 months ago)
- Last Synced: 2024-08-02T14:06:11.017Z (3 months ago)
- Language: Gleam
- Homepage: https://hex.pm/packages/radish
- Size: 688 KB
- Stars: 27
- Watchers: 2
- Forks: 2
- 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)
}
```