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

Method from_credentials

pymongo/asynchronous/auth.py:384–390  ·  view source on GitHub ↗
(
        creds: MongoCredential, address: tuple[str, int]
    )

Source from the content-addressed store, hash-verified

382
383 @staticmethod
384 def from_credentials(
385 creds: MongoCredential, address: tuple[str, int]
386 ) -> Optional[_AuthContext]:
387 spec_cls = _SPECULATIVE_AUTH_MAP.get(creds.mechanism)
388 if spec_cls:
389 return cast(_AuthContext, spec_cls(creds, address))
390 return None
391
392 def speculate_command(self) -> Optional[MutableMapping[str, Any]]:
393 raise NotImplementedError

Callers 1

_helloMethod · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected