Questions tagged [redis-py]

A Python interface to the Redis key-value store.

A Python interface to the Redis key-value store.

redis-py is developed and maintained by Andy McCurdy (sedrik@gmail.com).

It can be installed in your python environment using pip install redis or if you download the source from above link you can run python setup.py install

221 questions
0
votes
2 answers

redis: matching partial keys of hash

In a hash, I have a bunch of keys-values pairs my keys are in the following format: name:city john:newyork kate:chicago lisa:atlanta Im using python to access redis and in https://redis-py.readthedocs.org/en/latest/, i dont see any hash operations…
ealeon
  • 12,074
  • 24
  • 92
  • 173
0
votes
2 answers

No Auth "Authentication required" Error in redis Mass Insertion?

I am trying to insert millios of rows to redis . I gone through the redis massinsertion tutorials and tried cat data.txt | python redis_proto.py | redis-cli -p 6321 -a "myPassword" --pipe here the redis_proto.py is the python script which reads the…
John Deep
  • 161
  • 1
  • 2
  • 10
0
votes
0 answers

Why redis-py causes high cpu?

My website is powered by tornado. When doing the stress testing, I found python3 used almost all cpu while redis-server used a little. So, I did a profile, but the profile result makes me confused: It seems that all redis-py operations (r.xxx() and…
abcdabcd987
  • 2,043
  • 2
  • 23
  • 34
0
votes
1 answer

Redis operation blocks autobahn web socket server requests

I am using redis to save/update/delete data for my web socket server (Implemented using autobahn - twisted based web socket implementation) according to the messages I get from my server clients. For Redis operations I am using redis-py package.…
Bill Goldberg
  • 1,699
  • 5
  • 26
  • 50
0
votes
1 answer

Use sorted set to notifications system

I am using redis sorted sets to save user notifications. But as i never did a notification system, I am asking about my logic. I need to save 4 things for each notification. post_id post_type - A/B visible - Y/N checked - Y/N My question is…
anvd
  • 3,997
  • 19
  • 65
  • 126
0
votes
1 answer

redis-py pipeline hset not saving

I have set a pipeline on redis-py to save 2 diferent hashes p = self.app.redis.pipeline() key_id = '{}{}'.format(self.prefix,article.id) key_url = '{}{}'.format(self.prefix,article.url) # add the common fields from the ArticleModel p.hset(key_id,…
Adriano Almeida
  • 5,186
  • 5
  • 20
  • 28
0
votes
1 answer

redis-py AttributeError: 'PubSub' object has no attribute 'get_message'

I write the code in Windows Command Line. The code is just from Redis-py's GitHub page. I don't know how this happens,so I. dir(p) The result is: I cannot find "get_message". My redis is version -2.9.1.
hugleecool
  • 205
  • 2
  • 9
0
votes
1 answer

Redisco ListField unicode save error but validate true

class Article(models.Model): title = models.Attribute() tags = models.ListField(unicode) new = Article(title='what ever') new.tags = [ u'Niña', u'Niñb' ] new.is_validate() >>> True new.save() While when…
Scen
  • 921
  • 10
  • 14
0
votes
1 answer

Redis "ResponseError: unknown command '502'"

When using redis-py (version 2.8.0) I'm getting this strange error (below). Does anyone have a clue why this might be happening? return self.execute_command('GET', name) File "..../lib/python2.7/site-packages/redis/client.py", line 394, in…
Evgeny
  • 10,698
  • 9
  • 60
  • 70
-1
votes
1 answer

How can I sort a hash with sort?

I am trying to know how I can sort a hash with redis-py. I have the following code: redis_db.hmset('data:1',{'n':1, 'user': 'a'}) redis_db.hmset('data:2',{'n':4, 'user': 'b'}) redis_db.hmset('data:3',{'n':5, 'user':…
Tlaloc-ES
  • 4,825
  • 7
  • 38
  • 84
-2
votes
1 answer

How to create nested structure in redis using python?

redis = {} redis['A'] = {} redis['A']['1'] = value1 redis['A']['2'] = value2 redis['A']['3'] = value3 I need to make above structure in redis using python. I have established connection using redis-py client in…
tushar patil
  • 359
  • 2
  • 4
  • 13
1 2 3
14
15