I'd like to check the version of redis,
it could be accomplished on command line
In [181]: !redis-server --version
Redis server v=4.0.10 sha=00000000:0 malloc=libc bits=64 build=ea14acb2d1b3b56f
However, when it return the redis-py's version rather than redis version if
In [184]: redis.__version__
Out[184]: '2.10.6
It could be achieved in a wieldy way
In [186]: subprocess.run("redis-server --version", shell=True)
Redis server v=4.0.10 sha=00000000:0 malloc=libc bits=64 build=ea14acb2d1b3b56f
Out[186]: CompletedProcess(args='redis-server --version', returncode=0)
How could I check the version of redis directly with pure code?