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

Method spawn

pymongo/synchronous/encryption.py:266–275  ·  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

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

Callers 1

mark_commandMethod · 0.95

Calls 1

_spawn_daemonFunction · 0.90

Tested by

no test coverage detected