content/develop/clients/_index.md
Use the Redis client libraries to connect to Redis servers from your own code. We document the following client libraries for eight main languages:
| Language | Client name | Docs | Supported |
|---|---|---|---|
| Python | redis-py | [redis-py guide]({{< relref "/develop/clients/redis-py" >}}) | Yes |
| Python | RedisVL | [RedisVL guide]({{< relref "/develop/ai/redisvl" >}}) | Yes |
| C#/.NET | NRedisStack | [NRedisStack guide]({{< relref "/develop/clients/dotnet" >}}) | Yes |
| JavaScript | node-redis | [node-redis guide]({{< relref "/develop/clients/nodejs" >}}) | Yes |
| JavaScript | ioredis | [ioredis guide]({{< relref "/develop/clients/ioredis" >}}) | Yes |
| Java | Jedis | [Jedis guide]({{< relref "/develop/clients/jedis" >}}) | Yes |
| Java | Lettuce | [Lettuce guide]({{< relref "/develop/clients/lettuce" >}}) | Yes |
| Go | go-redis | [go-redis guide]({{< relref "/develop/clients/go" >}}) | Yes |
| PHP | Predis | [Predis guide]({{< relref "/develop/clients/php" >}}) | Best effort * |
| C | hiredis | [hiredis guide]({{< relref "/develop/clients/hiredis" >}}) | Yes |
| Rust | redis-rs | [redis-rs guide]({{< relref "/develop/clients/rust" >}}) | Best effort * |
| Ruby | redis-rb | [redis-rb guide]({{< relref "/develop/clients/ruby" >}}) | Yes |
{{< note >}}*<a name="best-effort"></a> Redis does not provide official support for third-party client libraries. However, we contribute new features, offer guidance, and collaborate with the community on a best-effort basis to help ensure these libraries remain reliable and up-to-date. {{< /note >}}
We also provide several higher-level [object mapping (OM)]({{< relref "/develop/clients/om-clients" >}}) libraries for [Python]({{< relref "/integrate/redisom-for-python" >}}), [C#/.NET]({{< relref "/integrate/redisom-for-net" >}}), [Node.js]({{< relref "/integrate/redisom-for-node-js" >}}), and [Java/Spring]({{< relref "/integrate/redisom-for-java" >}}).
The table below shows the recommended third-party client libraries for languages that Redis does not document directly:
You will need access to a Redis server to use these libraries. You can experiment with a local installation of Redis Open Source (see [Install Redis Open Source]({{< relref "/operate/oss_and_stack/install/install-stack/" >}})) or with a free trial of [Redis Cloud]({{< relref "/operate/rc" >}}). To interact with a Redis server without writing code, use the [Redis CLI]({{< relref "/develop/tools/cli" >}}) and [Redis Insight]({{< relref "/develop/tools/insight" >}}) tools.
For some languages, we only recommend one client library, but Python, JavaScript, Java, C#, and PHP have multiple options. The sections below summarize the differences between the options for each language.
redis-py is the recommended Python client library for
most use cases.RedisVL is specialized for handling
high-dimensional vector data and is a good choice for AI/ML workflows.node-redis is the recommended JavaScript client library
for most use cases.ioredis is an older library that is still supported, but
lacks some of the newer features and performance optimizations of node-redis.
Note that there is a migration guide available if you are interested in converting
your ioredis project to node-redis
(see [Migrate from ioredis]({{< relref "/develop/clients/nodejs/migration" >}})).Jedis supports the full feature set of Redis and has aLettuce supports synchronous, asynchronous,
and reactive operations. However, it has a more complex API than Jedis and doesn't currently
support all Redis features (notably time series and probabilistic data structures).NRedisStack is the recommended C# client
library for most use cases.Predis is the recommended PHP client library for
most use cases. It has "best effort" support from the Redis team (it's a third-party library
but the Redis team contributes to it and helps with issues) and has good coverage in the
[Redis documentation]({{< relref "/develop/clients/php" >}}). However, it is implemented in
PHP, which limits its performance compared to phpredis,
which is implemented in C.Use the decision tree below to help you choose the right client library for your needs, based on the recommendations in the previous sections. Note that you should regard the conclusions as a guideline for your research, not as a definitive answer.
id: client-recommendation
scope: clients
indentWidth: 28
rootQuestion: singleClientLanguageQuestion
questions:
singleClientLanguageQuestion:
text: |
Are you using Go, Rust, C, C++, Dart, or Ruby?
whyAsk: |
These languages have only one recommended client library,
so the choice is straightforward
answers:
yes:
value: "Yes"
outcome:
label: |
These languages only have one recommended client library. Use
the client library for your language listed in the table above.
id: singleClientLanguageOutcome
no:
value: "No"
nextQuestion: multiClientLanguageQuestion
multiClientLanguageQuestion:
text: |
Are you using Python, JavaScript, Java, or C#/.NET
and require object mapping (ORM-like) functionality?
whyAsk: |
RedisOM provides a high-level API for these languages.
If you don't need OM, we'll help you choose the best low-level client
answers:
yes:
value: "Yes"
outcome:
label: |
Use RedisOM for your language
(available for Python, JavaScript, Java, and C#/.NET)
id: redisOMOutcome
no:
value: "No"
nextQuestion: lowLevelClientQuestion
lowLevelClientQuestion:
text: Which language are you using?
whyAsk: |
Different languages have different low-level client libraries
optimized for their ecosystems
answers:
python:
value: Py
nextQuestion: pythonLowLevelQuestion
javascript:
value: JS
nextQuestion: javascriptLowLevelQuestion
java:
value: Java
nextQuestion: javaLowLevelQuestion
php:
value: PHP
nextQuestion: phpLowLevelQuestion
dotnet:
value: "C#"
outcome:
label: Use NRedisStack
id: nredisStackOutcome
pythonLowLevelQuestion:
text: |
Are you building an AI/ML application
mainly based around high-dimensional vector operations?
whyAsk: |
RedisVL is specialized for AI/ML workflows with vector data,
while redis-py is better for general-purpose use
answers:
yes:
value: "Yes"
outcome:
label: Use RedisVL
id: redisVLOutcome
No:
value: "No"
outcome:
label: Use redis-py
id: redisPyOutcome
javaLowLevelQuestion:
text: Do you need async or reactive operations?
whyAsk: |
Jedis supports only synchronous operations with a simpler API,
while Lettuce supports async and reactive patterns
answers:
yes:
value: "Yes"
outcome:
label: Use Lettuce
id: lettuceOutcome
no:
value: "No"
outcome:
label: Use Jedis
id: jedisOutcome
javascriptLowLevelQuestion:
text: Do you have an existing codebase using ioredis?
whyAsk: |
If you're already using ioredis, you can continue with it.
For new projects, node-redis is the recommended choice
answers:
yes:
value: "Yes"
outcome:
label: |
Use ioredis (but see the migration guide if you want to update to node-redis)
id: ioredisOutcome
no:
value: "No"
outcome:
label: Use node-redis
id: nodeRedisOutcome
phpLowLevelQuestion:
text: |
Is maximum performance a higher priority than full support and documentation?
whyAsk: |
PhpRedis is a C extension with better performance,
while Predis is a pure PHP implementation that is better supported and documented
answers:
yes:
value: "Yes"
outcome:
label: Use PhpRedis
id: phpredisOutcome
no:
value: "No"
outcome:
label: Use Predis
id: predisOutcome