{"id":"17889afd054af20d","repo":"redis/redis-py","slug":"command-docs-is-intentionally-not-implemented-in-t","errorCode":null,"errorMessage":"COMMAND DOCS is intentionally not implemented in the client.","messagePattern":"COMMAND DOCS is intentionally not implemented in the client\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"redis/commands/core.py","lineNumber":1397,"sourceCode":"        self: AsyncClientProtocol, *args: str\n    ) -> Awaitable[CommandGetKeysAndFlagsResponse]: ...\n\n    def command_getkeysandflags(\n        self, *args: str\n    ) -> CommandGetKeysAndFlagsResponse | Awaitable[CommandGetKeysAndFlagsResponse]:\n        \"\"\"\n        Returns array of keys from a full Redis command and their usage flags.\n\n        For more information, see https://redis.io/commands/command-getkeysandflags\n        \"\"\"\n        return self.execute_command(\"COMMAND GETKEYSANDFLAGS\", *args)\n\n    def command_docs(self, *args):\n        \"\"\"\n        This function throws a NotImplementedError since it is intentionally\n        not supported.\n        \"\"\"\n        raise NotImplementedError(\n            \"COMMAND DOCS is intentionally not implemented in the client.\"\n        )\n\n    @overload\n    def config_get(\n        self: SyncClientProtocol, pattern: PatternT = \"*\", *args: PatternT, **kwargs\n    ) -> dict[str | None, str | None]: ...\n\n    @overload\n    def config_get(\n        self: AsyncClientProtocol, pattern: PatternT = \"*\", *args: PatternT, **kwargs\n    ) -> Awaitable[dict[str | None, str | None]]: ...\n\n    def config_get(\n        self, pattern: PatternT = \"*\", *args: PatternT, **kwargs\n    ) -> dict[str | None, str | None] | Awaitable[dict[str | None, str | None]]:\n        \"\"\"\n        Return a dictionary of configuration based on the ``pattern``","sourceCodeStart":1379,"sourceCodeEnd":1415,"githubUrl":"https://github.com/redis/redis-py/blob/da03cdc7e8731092b13e395605c3c1fb2de25de1/redis/commands/core.py#L1379-L1415","documentation":"command_docs is a stub that always raises NotImplementedError. The COMMAND DOCS server command returns documentation in a format not useful to programmatic clients, so redis-py does not wrap it. Use the generic execute_command('COMMAND', 'DOCS', ...) escape hatch if you genuinely need it.","triggerScenarios":"Calling r.command_docs('GET'). Auto-generated client wrappers that invoke every command method. Copying redis-cli COMMAND DOCS usage into Python.","commonSituations":"Building a command-documentation viewer. IDE autocomplete exposes the method but it raises. Expecting structured docs from the server.","solutions":["Use r.execute_command('COMMAND', 'DOCS', *command_names) if you need the raw server docs.","Consult https://redis.io/commands for human-readable documentation instead.","Use r.command() for structured metadata if docs aren't strictly needed."],"exampleFix":"# before\nr.command_docs('SET')\n# after\nr.execute_command('COMMAND', 'DOCS', 'SET')","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    r.command_docs('SET')\nexcept NotImplementedError:\n    r.execute_command('COMMAND', 'DOCS', 'SET')","preventionTips":["command_docs is an intentional stub; use execute_command for the raw server response.","For human docs, use the Redis documentation website, not the client."],"tags":["not-implemented","command-introspection","api-gap"],"analyzedSha":"da03cdc7e8731092b13e395605c3c1fb2de25de1","analyzedAt":"2026-08-04T20:26:47.563Z","schemaVersion":2}