我使用Dynamic Redis为redis添加了其他功能.我可以使用redis-cli中的命令.是否可以使用redis-py在python脚本中使用这些新命令?
har*_*777 10
找到了答案.只需扩展其中一个客户端类(StrictRedis或Redis)并使用其execute_command方法.
redis_client = redis.StrictRedis(host, port, db)
data = redis_client.execute_command('custom redis command')
Run Code Online (Sandbox Code Playgroud)
https://github.com/andymccurdy/redis-py/issues/632
| 归档时间: |
|
| 查看次数: |
2321 次 |
| 最近记录: |