seaworthy.containers.redis¶
Redis container definition.
-
class
RedisContainer
(name='redis', image='redis:alpine', wait_patterns=('\* Ready to accept connections', ), **kwargs)[source]¶ Redis container definition.
Todo
Write more docs.
-
exec_redis_cli
(command, args=[], db=0, redis_cli_opts=[])[source]¶ Execute a
redis-cli
command inside a running container.Parameters: - command – the command to run
- args – a list of args for the command
- db – the db number to query (default
0
) - redis_cli_opts – a list of extra options to pass to
redis-cli
Returns: a tuple of the command exit code and output
-