def config_get(self, parameter='*'): """Get the value of a configuration parameter(s). If called without argument will return all parameters. :raises TypeError: if parameter is not string """ if not isinstance(parameter, str): raise TypeError("parameter must be str") fut = self.execute(b'CONFIG', b'GET', parameter, encoding='utf-8') return wait_make_dict(fut)
def xinfo_stream(self, stream): """Retrieve information about the given stream.""" fut = self.execute(b"XINFO", b"STREAM", stream) return wait_make_dict(fut)
def pubsub_numsub(self, *channels): """Returns the number of subscribers for the specified channels.""" return wait_make_dict(self._conn.execute( b'PUBSUB', b'NUMSUB', *channels))
def config_get(self, parameter): """Get the value of a configuration parameter.""" if not isinstance(parameter, str): raise TypeError("parameter must be str") fut = self._conn.execute(b'CONFIG', b'GET', parameter) return wait_make_dict(fut)
def xinfo_stream(self, stream): """Retrieve information about the given stream.""" fut = self.execute(b'XINFO', b'STREAM', stream) return wait_make_dict(fut)
def hgetall(self, key, *, encoding=_NOTSET): """Get all the fields and values in a hash.""" fut = self._conn.execute(b'HGETALL', key, encoding=encoding) return wait_make_dict(fut)
def hgetall(self, key, *, encoding=_NOTSET): """Get all the fields and values in a hash.""" fut = self.execute(b"HGETALL", key, encoding=encoding) return wait_make_dict(fut)