shorebird_redis_client 0.0.1 copy "shorebird_redis_client: ^0.0.1" to clipboard
shorebird_redis_client: ^0.0.1 copied to clipboard

A lightweight Dart client library for communicating with a Redis server. Built by Shorebird.

๐Ÿฆ Shorebird Redis Client #

pub package ci codecov License: MIT

A Dart library for interacting with a Redis server.

Built with ๐Ÿ’™ by Shorebird.

Quick Start ๐Ÿš€ #

import 'package:shorebird_redis_client/shorebird_redis_client.dart';

Future<void> main() async {
  // Create an instance of a RedisClient.
  final client = RedisClient();

  // Connect to the Redis server.
  await client.connect();

  // Set the value of a key.
  await client.set(key: 'HELLO', value: 'WORLD');

  // Get the value of a key.
  final value = await client.get(key: 'HELLO'); // WORLD

  // Delete the key.
  await client.delete(key: 'HELLO');

  // Close the connection to the Redis server.
  await client.close();
}

Testing ๐Ÿงช #

To run the tests locally, ensure you have Docker installed and pull the redis-stack-server image:

docker pull redis/redis-stack-server

Then, start the server:

docker run -p 6379:6379 --rm -e REDIS_ARGS="--requirepass password" redis/redis-stack-server

Now you can run the tests locally:

dart test

License ๐Ÿ“ƒ #

Shorebird packages are licensed for use under either Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.

See our license philosophy for more information on why we license files this way: https://github.com/shorebirdtech/handbook/blob/main/engineering.md#licensing-philosophy

10
likes
0
pub points
76%
popularity

Publisher

verified publishershorebird.dev

A lightweight Dart client library for communicating with a Redis server. Built by Shorebird.

Homepage
Repository (GitHub)
View/report issues

Topics

#redis #cache #shorebird

License

unknown (license)

Dependencies

resp_client

More

Packages that depend on shorebird_redis_client