{"id":13801083,"url":"https://github.com/zio/zio-redis","last_synced_at":"2026-01-17T23:36:50.360Z","repository":{"id":39744077,"uuid":"232363778","full_name":"zio/zio-redis","owner":"zio","description":"A ZIO-based redis client","archived":false,"fork":false,"pushed_at":"2026-01-16T08:38:16.000Z","size":4644,"stargazers_count":130,"open_issues_count":22,"forks_count":68,"subscribers_count":11,"default_branch":"main","last_synced_at":"2026-01-16T23:01:30.970Z","etag":null,"topics":["redis","zio"],"latest_commit_sha":null,"homepage":"https://zio.github.io/zio-redis","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":"CLA.md"}},"created_at":"2020-01-07T16:12:24.000Z","updated_at":"2026-01-16T08:37:38.000Z","dependencies_parsed_at":"2023-10-22T12:22:06.211Z","dependency_job_id":"87235fa8-2201-479d-84ed-f24276641d07","html_url":"https://github.com/zio/zio-redis","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/zio/zio-redis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zio","download_url":"https://codeload.github.com/zio/zio-redis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-redis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28522310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T22:11:28.393Z","status":"ssl_error","status_checked_at":"2026-01-17T22:11:27.841Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["redis","zio"],"created_at":"2024-08-04T00:01:19.330Z","updated_at":"2026-01-17T23:36:50.353Z","avatar_url":"https://github.com/zio.png","language":"Scala","funding_links":[],"categories":["Table of Contents"],"sub_categories":["Database"],"readme":"[//]: # (This file was autogenerated using `zio-sbt-website` plugin via `sbt generateReadme` command.)\n[//]: # (So please do not edit it manually. Instead, change \"docs/index.md\" file or sbt setting keys)\n[//]: # (e.g. \"readmeDocumentation\" and \"readmeSupport\".)\n\n# ZIO Redis\n\n[![Development](https://img.shields.io/badge/Project%20Stage-Development-green.svg)](https://github.com/zio/zio/wiki/Project-Stages) ![CI Badge](https://github.com/zio/zio-redis/workflows/CI/badge.svg) [![Sonatype Releases](https://img.shields.io/nexus/r/https/oss.sonatype.org/dev.zio/zio-redis_2.13.svg?label=Sonatype%20Release)](https://oss.sonatype.org/content/repositories/releases/dev/zio/zio-redis_2.13/) [![Sonatype Snapshots](https://img.shields.io/nexus/s/https/oss.sonatype.org/dev.zio/zio-redis_2.13.svg?label=Sonatype%20Snapshot)](https://oss.sonatype.org/content/repositories/snapshots/dev/zio/zio-redis_2.13/) [![javadoc](https://javadoc.io/badge2/dev.zio/zio-redis-docs_2.13/javadoc.svg)](https://javadoc.io/doc/dev.zio/zio-redis-docs_2.13) [![ZIO Redis](https://img.shields.io/github/stars/zio/zio-redis?style=social)](https://github.com/zio/zio-redis)\n\n## Introduction\n\n[ZIO Redis](https://github.com/zio/zio-redis) is a ZIO-native Redis client.\nIt aims to provide a **type-safe** and **performant** API for accessing Redis\ninstances.\n\n## Installation\n\nTo use ZIO Redis, add the following line to your `build.sbt`:\n\n```scala\nlibraryDependencies += \"dev.zio\" %% \"zio-redis\" % \"1.1.12\"\n```\n\n## Example\n\nTo execute our ZIO Redis effect, we should provide the `RedisExecutor` layer to that effect. To create this layer we\nshould also provide the following layers:\n\n- **RedisConfig** — Using default one, will connect to the `localhost:6379` Redis instance.\n- **BinaryCodec** — In this example, we are going to use the built-in `ProtobufCodec` codec from zio-schema project.\n\nTo run this example we should put following dependencies in our `build.sbt` file:\n\n```scala\nlibraryDependencies ++= Seq(\n  \"dev.zio\" %% \"zio-redis\" % \"1.1.12\",\n  \"dev.zio\" %% \"zio-schema-protobuf\" % \"1.6.1\"\n)\n```\n\n```scala\nimport zio._\nimport zio.redis._\nimport zio.schema._\nimport zio.schema.codec._\n\nobject ZIORedisExample extends ZIOAppDefault {\n  \n  object ProtobufCodecSupplier extends CodecSupplier {\n    def get[A: Schema]: BinaryCodec[A] = ProtobufCodec.protobufCodec\n  }\n  \n  val myApp: ZIO[Redis, RedisError, Unit] = \n    for {\n      redis \u003c- ZIO.service[Redis]\n      _     \u003c- redis.set(\"myKey\", 8L, Some(1.minutes))\n      v     \u003c- redis.get(\"myKey\").returning[Long]\n      _     \u003c- Console.printLine(s\"Value of myKey: $v\").orDie\n      _     \u003c- redis.hSet(\"myHash\", (\"k1\", 6), (\"k2\", 2))\n      _     \u003c- redis.rPush(\"myList\", 1, 2, 3, 4)\n      _     \u003c- redis.sAdd(\"mySet\", \"a\", \"b\", \"a\", \"c\")\n    } yield ()\n\n  override def run = \n    myApp.provide(Redis.local, ZLayer.succeed[CodecSupplier](ProtobufCodecSupplier))\n}\n```\n\n## Testing\n\nTo test you can use the embedded redis instance by adding to your build:\n\n```scala\nlibraryDependencies := \"dev.zio\" %% \"zio-redis-embedded\" % \"1.1.12\"\n```\n\nThen you can supply `EmbeddedRedis.layer.orDie` as your `RedisConfig` and you're good to go!\n\n```scala\nimport zio._\nimport zio.redis._\nimport zio.redis.embedded.EmbeddedRedis\nimport zio.schema.{DeriveSchema, Schema}\nimport zio.schema.codec.{BinaryCodec, ProtobufCodec}\nimport zio.test._\nimport zio.test.Assertion._\nimport java.util.UUID\n\nobject EmbeddedRedisSpec extends ZIOSpecDefault {\n  object ProtobufCodecSupplier extends CodecSupplier {\n    def get[A: Schema]: BinaryCodec[A] = ProtobufCodec.protobufCodec\n  }\n  \n  final case class Item private (id: UUID, name: String, quantity: Int)\n  object Item {\n    implicit val itemSchema: Schema[Item] = DeriveSchema.gen[Item]\n  }\n  \n  def spec = suite(\"EmbeddedRedis should\")(\n    test(\"set and get values\") {\n      for {\n        redis \u003c- ZIO.service[Redis]\n        item   = Item(UUID.randomUUID, \"foo\", 2)\n        _     \u003c- redis.set(s\"item.${item.id.toString}\", item)\n        found \u003c- redis.get(s\"item.${item.id.toString}\").returning[Item]\n      } yield assert(found)(isSome(equalTo(item)))\n    }\n  ).provideShared(\n    EmbeddedRedis.layer,\n    ZLayer.succeed[CodecSupplier](ProtobufCodecSupplier),\n    Redis.singleNode\n  ) @@ TestAspect.silentLogging\n}\n```\n\n## Resources\n\n- [ZIO Redis](https://www.youtube.com/watch?v=yqFt3b3RBkI) by Dejan Mijic — Redis is one of the most commonly used\n  in-memory data structure stores. In this talk, Dejan will introduce ZIO Redis, a purely functional, strongly typed\n  client library backed by ZIO, with excellent performance and extensive support for nearly all of Redis' features. He\n  will explain the library design using the bottom-up approach - from communication protocol to public APIs. Finally, he\n  will wrap the talk by demonstrating the client's usage and discussing its performance characteristics.\n\n## Documentation\n\nLearn more on the [ZIO Redis homepage](https://zio.dev/zio-redis)!\n\n## Contributing\n\nFor the general guidelines, see ZIO [contributor's guide](https://zio.dev/contributor-guidelines).\n\n## Code of Conduct\n\nSee the [Code of Conduct](https://zio.dev/code-of-conduct)\n\n## Support\n\nCome chat with us on [![Badge-Discord]][Link-Discord].\n\n[Badge-Discord]: https://img.shields.io/discord/629491597070827530?logo=discord \"chat on discord\"\n[Link-Discord]: https://discord.gg/2ccFBr4 \"Discord\"\n\n## License\n\n[License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzio%2Fzio-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzio%2Fzio-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzio%2Fzio-redis/lists"}