{"id":13508891,"url":"https://github.com/akdilsiz/elixir-rediscl","last_synced_at":"2025-04-13T06:32:46.338Z","repository":{"id":32757412,"uuid":"141812933","full_name":"akdilsiz/elixir-rediscl","owner":"akdilsiz","description":"A minimal redis client with connection pooling for elixir","archived":false,"fork":false,"pushed_at":"2022-06-14T13:50:59.000Z","size":111,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-26T23:04:29.517Z","etag":null,"topics":["elixir","minimal","redis"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akdilsiz.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":null,"security":null,"support":null}},"created_at":"2018-07-21T13:01:33.000Z","updated_at":"2022-06-14T03:29:34.000Z","dependencies_parsed_at":"2022-09-16T01:35:32.873Z","dependency_job_id":null,"html_url":"https://github.com/akdilsiz/elixir-rediscl","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akdilsiz%2Felixir-rediscl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akdilsiz%2Felixir-rediscl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akdilsiz%2Felixir-rediscl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akdilsiz%2Felixir-rediscl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akdilsiz","download_url":"https://codeload.github.com/akdilsiz/elixir-rediscl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248674658,"owners_count":21143760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["elixir","minimal","redis"],"created_at":"2024-08-01T02:01:00.044Z","updated_at":"2025-04-13T06:32:46.282Z","avatar_url":"https://github.com/akdilsiz.png","language":"Elixir","funding_links":[],"categories":["ORM and Datamapping"],"sub_categories":[],"readme":"# Elixir Redis Client\n\nA minimal redis client with connection pooling  \n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/58e142f2a26c45528daad73ad3aa03d6)](https://app.codacy.com/app/akdilsiz/elixir-rediscl?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=akdilsiz/elixir-rediscl\u0026utm_campaign=Badge_Grade_Dashboard)\n[![CircleCI](https://circleci.com/gh/akdilsiz/elixir-rediscl/tree/master.svg?style=svg)](https://circleci.com/gh/akdilsiz/elixir-rediscl/tree/master)\n[![Coverage Status](https://coveralls.io/repos/github/akdilsiz/elixir-rediscl/badge.svg)](https://coveralls.io/github/akdilsiz/elixir-rediscl)\n[![Hex.pm](https://img.shields.io/hexpm/v/rediscl.svg)](https://hex.pm/packages/rediscl)\n[![Hex.pm](https://img.shields.io/hexpm/dt/rediscl.svg)](https://hex.pm/packages/rediscl)\n\n##TODO List\n- [ ] Completed docs \n- [ ] All redis commands will be added.\n\n## Features\n- Connection pooling\n- Pipe query builder (basic commands)\n- Basic Query commands\n\n## Installation\n[available in Hex](https://hex.pm/packages/rediscl), the package can be installed\nby adding `rediscl` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:rediscl, \"~\u003e 0.1\"}\n  ]\nend\n```\n\n## Documentation\n[available HexDocs](https://hexdocs.pm/rediscl).\n\n## Configuration\n\n```elixir\n# Without password\nconfig :rediscl,\n    host: {127, 0, 0, 1},\n    port: 6379,\n    database: 0,\n    pool: 15,\n    timeout: 15_000\n\n# With password\nconfig :rediscl,\n    host: {127, 0, 0, 1},\n    port: 6379,\n    password: \"\u003cpassword\u003e\",\n    database: 0,\n    pool: 15,\n    timeout: 15_000\n```\n\nIf do you are using json library?\n```elixir\nconfig :rediscl,\n  json_library: Jason\n```\n\n## Examples\n```elixir\ndefmodule Example do\n    alias Rediscl\n\n    def example_one do\n        {:ok, _} = Rediscl.Query.set(\"key:1\", \"value1\")\n    end\n\n    def example_two do\n        {:ok, value} = Rediscl.Query.get(\"key:1\")\n    end\n\n    def example_three do\n        {:ok, list_values} = Rediscl.Query.mget([\"key:1\", \"key:2\", \"key:3\"])\n    end\n\n    def example_jsonable_one do\n      ## If you are only going to use it with a key for response\n      ## For this example, options are given based on the Jason library.\n      {:ok, _} =\n        Rediscl.Query.get(%{key: 1}, \n          [{:json_response, true}, {:json_response_opts, [{:keys, :atoms!}]}])\n    end\n    \n    def example_jsonable_two do\n      ## If you are only going to use it with key and value.\n      {:ok, _} =\n        Rediscl.Query.set(%{key: 1}, %{value: 1}, \n          [{:jsonable, true}, {:encode_key, true}])\n    end\n\n    def example_jsonable_three do\n      ## If you're going to use a query with a lot of keys and a value.\n      {:ok, _} =\n        Query.smove(%{key: 2}, %{key: 1}, \"value3\",\n          [{:jsonable, true}, {:encode_multiple_keys, true}])\n    end\n\n    def example_jsonable_four do\n      ## If you're going to use a query with a lot of keys.\n      {:ok, _values} = \n        Query.sunion([%{key: 1}, \"key:2\"],\n          [{:jsonable, true}, {:encode_multiple_keys, true}])\n    end    \nend\n\ndefmodule ExamplePipeBuilder do\n    import Rediscl.Query.Pipe\n    alias Rediscl.Query\n\n    def example do\n        query = begin set: [\"key:10\", \"1\"],\n                      mset: [\"key:11\", \"value2\", \"key:12\", \"value3\"],\n                      lpush: [\"key:13\", [\"-1\", \"-2\", \"-3\"]],\n                      rpush: [\"key:14\", [\"1\", \"2\", \"3\"]],\n                      lrange: [\"key:13\", 0, \"-1\"],\n                      lrem: [\"key:13\", 1, \"-1\"]\n\n        {:ok, results} = Query.run_pipe(query)\n    end\nend\n```\n\n## Use rediscl for Mix.Task\n```elixir\nimport Mix.Rediscl\nalias Rediscl\n\ndef run(_) do\n    Mix.Task.run \"app.start\"\n    \n    ### Your codes\n    Rediscl.Query.set(\"key:1\", \"value1\")\n    ### Your codes\nend\n\n```\n\n## Contribution\n\nAll contributions are welcomed as long as you follow the conventions of *Elixir* language.\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakdilsiz%2Felixir-rediscl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakdilsiz%2Felixir-rediscl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakdilsiz%2Felixir-rediscl/lists"}