Beispiel #1
0
    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)
Beispiel #2
0
    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)
Beispiel #3
0
 def xinfo_stream(self, stream):
     """Retrieve information about the given stream."""
     fut = self.execute(b"XINFO", b"STREAM", stream)
     return wait_make_dict(fut)
Beispiel #4
0
 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))
Beispiel #5
0
 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)
Beispiel #6
0
 def xinfo_stream(self, stream):
     """Retrieve information about the given stream."""
     fut = self.execute(b'XINFO', b'STREAM', stream)
     return wait_make_dict(fut)
Beispiel #7
0
 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)
Beispiel #8
0
 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)
Beispiel #9
0
 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)