@@ -55,7 +55,7 @@ option to ``True``. You can do this in two ways: by passing an argument to the
5555
5656 .. code-block:: python
5757
58- client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname@ :<port>", tls=True)
58+ client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname:<port>", tls=True)
5959
6060 .. tab:: Connection String
6161 :tabid: connectionstring
@@ -96,7 +96,7 @@ You can do this in two ways: by passing an argument to the
9696
9797 .. code-block:: python
9898
99- client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname@ :<port>",
99+ client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname> :<port>",
100100 tls=True,
101101 tlsCAFile="/path/to/ca.pem")
102102
@@ -126,7 +126,7 @@ To use the Online Certificate Status Protocol (OCSP) to validate a server certif
126126you must install {+driver-short+} with the ``ocsp`` option, as shown in the following
127127example:
128128
129- .. code-block:: python
129+ .. code-block:: sh
130130
131131 python -m pip install pymongo[ocsp]
132132
@@ -154,7 +154,7 @@ You can do this in two ways: by passing an argument to the
154154
155155 .. code-block:: python
156156
157- client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname@ :<port>",
157+ client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname> :<port>",
158158 tls=True,
159159 tlsDisableOCSPEndpointCheck=True)
160160
@@ -188,7 +188,7 @@ You can do this in two ways: by passing an argument to the
188188
189189 .. code-block:: python
190190
191- client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname@ :<port>",
191+ client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname> :<port>",
192192 tls=True,
193193 tlsCRLFile="/path/to/crl.pem")
194194
@@ -221,7 +221,7 @@ You can do this in two ways: by passing an argument to the
221221
222222 .. code-block:: python
223223
224- client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname@ :<port>",
224+ client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname> :<port>",
225225 tls=True,
226226 tlsCertificateKeyFile='/path/to/client.pem')
227227
@@ -230,7 +230,7 @@ You can do this in two ways: by passing an argument to the
230230
231231 .. code-block:: python
232232
233- uri = ("mongodb://<username>:<password>@<hostname@ :<port>/?"
233+ uri = ("mongodb://<username>:<password>@<hostname:<port>/?"
234234 "tls=true"
235235 "&tlsCertificateKeyFile=path/to/client.pem")
236236 client = pymongo.MongoClient(uri)
@@ -262,7 +262,7 @@ You can do this in two ways: by passing an argument to the
262262
263263 .. code-block:: python
264264
265- client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname@ :<port>",
265+ client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname:<port>",
266266 tls=True,
267267 tlsCertificateKeyFile='/path/to/client.pem',
268268 tlsCertificateKeyFilePassword=<passphrase>)
@@ -272,7 +272,7 @@ You can do this in two ways: by passing an argument to the
272272
273273 .. code-block:: python
274274
275- uri = ("mongodb://<username>:<password>@<hostname@ :<port>/?"
275+ uri = ("mongodb://<username>:<password>@<hostname:<port>/?"
276276 "tls=true"
277277 "&tlsCertificateKeyFile=path/to/client.pem"
278278 "&tlsCertificateKeyFilePassword=<passphrase>")
@@ -311,7 +311,7 @@ option to ``True``. You can do this in two ways: by passing an argument to the
311311
312312 .. code-block:: python
313313
314- client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname@ :<port>",
314+ client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname:<port>",
315315 tls=True,
316316 tlsInsecure=True)
317317
@@ -320,7 +320,7 @@ option to ``True``. You can do this in two ways: by passing an argument to the
320320
321321 .. code-block:: python
322322
323- uri = ("mongodb://<username>:<password>@<hostname@ :<port>/?"
323+ uri = ("mongodb://<username>:<password>@<hostname> :<port>/?"
324324 "tls=true"
325325 "&tlsInsecure=true")
326326 client = pymongo.MongoClient(uri)
@@ -335,7 +335,7 @@ To disable only certificate validation, set the ``tlsAllowInvalidCertificates``
335335
336336 .. code-block:: python
337337
338- client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname@ :<port>",
338+ client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname> :<port>",
339339 tls=True,
340340 tlsAllowInvalidCertificates=True)
341341
@@ -344,7 +344,7 @@ To disable only certificate validation, set the ``tlsAllowInvalidCertificates``
344344
345345 .. code-block:: python
346346
347- uri = ("mongodb://<username>:<password>@<hostname@ :<port>/?"
347+ uri = ("mongodb://<username>:<password>@<hostname> :<port>/?"
348348 "tls=true"
349349 "&tlsAllowInvalidCertificates=true")
350350 client = pymongo.MongoClient(uri)
@@ -359,7 +359,7 @@ To disable only hostname verification, set the ``tlsAllowInvalidHostnames`` opti
359359
360360 .. code-block:: python
361361
362- client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname@ :<port>",
362+ client = pymongo.MongoClient("mongodb://<username>:<password>@<hostname> :<port>",
363363 tls=True,
364364 tlsAllowInvalidHostnames=True)
365365
@@ -368,7 +368,7 @@ To disable only hostname verification, set the ``tlsAllowInvalidHostnames`` opti
368368
369369 .. code-block:: python
370370
371- uri = ("mongodb://<username>:<password>@<hostname@ :<port>/?"
371+ uri = ("mongodb://<username>:<password>@<hostname> :<port>/?"
372372 "tls=true"
373373 "&tlsAllowInvalidHostnames=true")
374374 client = pymongo.MongoClient(uri)
0 commit comments