Reputation: 503
I used Dynamic Redis to add additional functionality to redis. I'm able to use the commands from the redis-cli. Is it possible to use redis-py to use those new commands in a python script ?
Upvotes: 4
Views: 7040
Reputation: 503
Found the answer. Just extend one of the client classes(StrictRedis or Redis) and use their execute_command method.
redis_client = redis.StrictRedis(host, port, db)
data = redis_client.execute_command('custom redis command')
https://github.com/andymccurdy/redis-py/issues/632
Upvotes: 20