@@ -205,6 +205,12 @@ def __init__(
205
205
- `connect` (optional): if ``True`` (the default), immediately
206
206
begin connecting to MongoDB in the background. Otherwise connect
207
207
on the first operation.
208
+ - `directConnection` (optional): if ``True``, forces this client to
209
+ connect directly to the specified MongoDB host as a standalone.
210
+ If ``false``, the client connects to the entire replica set of
211
+ which the given MongoDB host(s) is a part. If this is ``True``
212
+ and a mongodb+srv:// URI or a URI containing multiple seeds is
213
+ provided, an exception will be raised.
208
214
209
215
| **Other optional parameters can be passed as keyword arguments:**
210
216
@@ -492,8 +498,10 @@ def __init__(
492
498
.. mongodoc:: connections
493
499
494
500
.. versionchanged:: 3.11
495
- Added the ``tlsDisableOCSPEndpointCheck`` keyword argument and
496
- URI option.
501
+ Added the following keyword arguments and URI options:
502
+
503
+ - ``tlsDisableOCSPEndpointCheck``
504
+ - ``directConnection``
497
505
498
506
.. versionchanged:: 3.9
499
507
Added the ``retryReads`` keyword argument and URI option.
@@ -707,7 +715,8 @@ def __init__(
707
715
server_selection_timeout = options .server_selection_timeout ,
708
716
server_selector = options .server_selector ,
709
717
heartbeat_frequency = options .heartbeat_frequency ,
710
- fqdn = fqdn )
718
+ fqdn = fqdn ,
719
+ direct_connection = options .direct_connection )
711
720
712
721
self ._topology = Topology (self ._topology_settings )
713
722
if connect :
0 commit comments