Return the MongoClient options for creating a duplicate client.
(self)
| 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): |