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

Method client_options

test/__init__.py:135–145  ·  view source on GitHub ↗

Return the MongoClient options for creating a duplicate client.

(self)

Source from the content-addressed store, hash-verified

133
134 @property
135 def client_options(self):
136 """Return the MongoClient options for creating a duplicate client."""
137 opts = client_context.default_client_options.copy()
138 opts["host"] = host
139 opts["port"] = port
140 if client_context.auth_enabled:
141 opts["username"] = db_user
142 opts["password"] = db_pwd
143 if self.replica_set_name:
144 opts["replicaSet"] = self.replica_set_name
145 return opts
146
147 @property
148 def uri(self):

Callers

nothing calls this directly

Calls 1

copyMethod · 0.80

Tested by

no test coverage detected