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

Function has_c

pymongo/common.py:1067–1074  ·  view source on GitHub ↗

Is the C extension installed?

()

Source from the content-addressed store, hash-verified

1065
1066
1067def has_c() -> bool:
1068 """Is the C extension installed?"""
1069 try:
1070 from pymongo import _cmessage # type: ignore[attr-defined] # noqa: F401
1071
1072 return True
1073 except ImportError:
1074 return False
1075
1076
1077class Version(tuple[int, ...]):

Callers 6

test_metadataMethod · 0.90
_test_handshakeMethod · 0.90
_check_handshake_dataFunction · 0.90
test_metadataMethod · 0.90
_test_handshakeMethod · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by 5

test_metadataMethod · 0.72
_test_handshakeMethod · 0.72
_check_handshake_dataFunction · 0.72
test_metadataMethod · 0.72
_test_handshakeMethod · 0.72