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

Method spawn

pymongo/asynchronous/encryption.py:269–278  ·  view source on GitHub ↗

Spawn mongocryptd. Note this method is thread safe; at most one mongocryptd will start successfully.

(self)

Source from the content-addressed store, hash-verified

267 return [_dict_to_bson(doc, False, _DATA_KEY_OPTS) async for doc in cursor]
268
269 def spawn(self) -> None:
270 """Spawn mongocryptd.
271
272 Note this method is thread safe; at most one mongocryptd will start
273 successfully.
274 """
275 self._spawned = True
276 args = [self.opts._mongocryptd_spawn_path or "mongocryptd"]
277 args.extend(self.opts._mongocryptd_spawn_args)
278 _spawn_daemon(args)
279
280 async def mark_command(self, database: str, cmd: bytes) -> bytes | memoryview:
281 """Mark a command for encryption.

Callers 1

mark_commandMethod · 0.95

Calls 1

_spawn_daemonFunction · 0.90

Tested by

no test coverage detected