Questions tagged [redis-py]
A Python interface to the Redis key-value store.
redis-py
235
questions
0
votes
2
answers
61
views
redis.exceptions.ResponseError: unknown command 'JSON.SET' with redis-py
No matter what I try, I keep getting this error message.
import redis
r = redis.Redis(host='127.0.0.1', port=6379)
r.ping() # -> True
r.json().set('test', '.', '{"foo": "bar"}'...
0
votes
0
answers
41
views
RedisCluster client failing to reconnect to AWS Elasticache cluster after node failover
lib - redis py redis==5.0.0
python version 3.7
redis cluster - 1 shard, 2 nodes
when we do node failovers, the client cannot reconnect and throw RedisClusterException:Redis Cluster cannot be connected....
1
vote
1
answer
92
views
Redisearch-Py search Redis JSON schema for entries belonging to a specific tag
We are using Redisearch to insert structured JSON into Redis and searching by content to power autocomplete.
This is how our code looks like in Python:
rs = r.ft("a:a")
schema = (
TextField(...
0
votes
1
answer
54
views
Redis doesn't persist data between restarting Docker containers
I have built flask REST API that has connection to mysql database via mysql.connector python, i decided to implement caching and use redis for this, i containerized my services with docker and manage ...
1
vote
2
answers
150
views
Combine Redis-Python pipeline with JSON
Redis provides a way to input structured JSON documents and retrieve them by content (this can, for example, power an autocomplete search experience). So I am doing this, and it is working fine:
test =...
0
votes
0
answers
155
views
How to configure redis cluster for celery.py?
I'm trying to run my celery worker but I keep running into errors. I'm using aws elasticache redis cluster and running it on an ec2 instance.
# celery.py
from __future__ import absolute_import, ...
0
votes
0
answers
31
views
Issues with Keyword Arguments in redis-py when Acknowledging Stream Messages
I am currently using redis-py to read streams, but when calling xack, I found that everything works fine if I use positional arguments. However, when I use keyword arguments and specify the names for ...
0
votes
2
answers
445
views
using Redis python read in messages already being sent to redis
A system I'm working on currently is receiving messages in redis. I would like to write a python script that can read in those messages , modify them and return them to a different channel/key in ...
2
votes
3
answers
1k
views
RuntimeError: Event loop is closed when using redis.asyncio with pytest-asyncio
I am trying to write tests for an asyncio-based Python app that uses Redis.
I reproduced the Python code from the official Redis as a document database quick start guide and turned it into tests:
...
4
votes
0
answers
629
views
Behavior of redis.ConnectionPool with asyncio (redis-py)
I am using Redis in a FastAPI application using the redis-py library. I am unclear about the behavior of redis.ConnectionPool in this context, especially regarding how it handles situations where the ...
0
votes
0
answers
111
views
How to create redis python client from sentinel and use sentinelConnectPool?
I have sentinel address and master name, so how can I connect using redis-py?
I wish use master_for function with sentinelConnectPool to connect redis and exec command.
Can anyone please give me a ...
6
votes
3
answers
497
views
Redisearch full text index not working with Python client
I am trying to follow this Redis documentation link to create a small DB of notable people searchable in real time (using Python client).
I tried a similar code, but the final line, which queries by &...
0
votes
0
answers
648
views
How to run RedisInsight V2 and a Redis Cluster on Docker localhost using user-defined bridge?
We've noticed many peers are struggling with the RedisInsight V2 setup and a dockerized Redis Cluster on Windows. We are running Windows 11 and the latest Docker Desktop with WLS2 activated. Since ...
0
votes
1
answer
109
views
Why is my Python asyncio script returning None when fetching non-empty data from Redis?
I'm encountering an issue in my Python script where I asynchronously fetch and save data from multiple exchanges into Redis. The goal is to periodically update the data and retain only the most recent ...
1
vote
2
answers
946
views
writing test for redis.asyncio using fakeredis
I want to test the functionality of action_base_result using fakeredis-py to create tests without a real Redis server.
and don't want to add a third parameter to action_base_result:
import redis....