MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / command_response

Method command_response

pymongo/message.py:1434–1438  ·  view source on GitHub ↗

Unpack a command response.

(self, codec_options: CodecOptions[Any])

Source from the content-addressed store, hash-verified

1432 return bson._decode_all_selective(self.documents, codec_options, user_fields)
1433
1434 def command_response(self, codec_options: CodecOptions[Any]) -> dict[str, Any]:
1435 """Unpack a command response."""
1436 docs = self.unpack_response(codec_options=codec_options)
1437 assert self.number_returned == 1
1438 return docs[0]
1439
1440 def raw_command_response(self) -> NoReturn:
1441 """Return the bytes of the command response."""

Callers

nothing calls this directly

Calls 1

unpack_responseMethod · 0.95

Tested by

no test coverage detected