MCPcopy
hub / github.com/redis/redis-py / text

Method text

redis/http/http_client.py:33–35  ·  view source on GitHub ↗
(self, encoding: Optional[str] = None)

Source from the content-addressed store, hash-verified

31 content: bytes
32
33 def text(self, encoding: Optional[str] = None) -> str:
34 enc = encoding or self._get_encoding()
35 return self.content.decode(enc, errors="replace")
36
37 def json(self) -> Any:
38 return json.loads(self.text(encoding=self._get_encoding()))

Callers 2

jsonMethod · 0.95
_json_callMethod · 0.80

Calls 2

_get_encodingMethod · 0.95
decodeMethod · 0.80

Tested by

no test coverage detected