Last active
April 7, 2020 13:14
-
-
Save kristoff-it/5a9ff2808c8ab7bf0a453669f5b79cec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ redis-cli hset vec:1 x 10 y 5 z 23 | |
$ redis-cli hset vec:2 x 2 y 5 z 5 | |
$ python3 | |
>>> import redis | |
>>> r = redis.Redis(decode_responses=True) # decode_responses is useful in py3 | |
>>> script = open("path/to/script.py", 'r').read() | |
>>> r.execute_command("RG.PYEXECUTE", script) | |
[['14.0', '5.0', '6.0'], []] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment