MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / fetch_keys

Method fetch_keys

pymongo/synchronous/encryption.py:304–314  ·  view source on GitHub ↗

Yields one or more keys from the key vault. :param filter: The filter to pass to find. :return: A generator which yields the requested keys from the key vault.

(self, filter: bytes)

Source from the content-addressed store, hash-verified

302 return res.raw
303
304 def fetch_keys(self, filter: bytes) -> Generator[bytes | memoryview, None]:
305 """Yields one or more keys from the key vault.
306
307 :param filter: The filter to pass to find.
308
309 :return: A generator which yields the requested keys from the key vault.
310 """
311 assert self.key_vault_coll is not None
312 with self.key_vault_coll.find(RawBSONDocument(filter)) as cursor:
313 for key in cursor:
314 yield key.raw
315
316 def insert_data_key(self, data_key: bytes) -> Binary:
317 """Insert a data key into the key vault.

Callers

nothing calls this directly

Calls 2

RawBSONDocumentClass · 0.90
findMethod · 0.45

Tested by

no test coverage detected