File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -420,3 +420,21 @@ partially-converted asynchronous version of the same name to the `test/asynchron
420420Use this generated file as a starting point for the completed conversion.
421421
422422The script is used like so: ` python tools/convert_test_to_async.py [test_file.py] `
423+
424+ ## Running PyMongo with SSL
425+ Note that ` AsyncMongoClient ` does not support PyOpenSSL.
426+ Assuming all required packages are installed, set the ` tls ` and ` tlsAllowInvalidCertificates ` flags in the URI to enable
427+ the driver to connect with SSL, like so:
428+ ``` python
429+ from pymongo import MongoClient
430+
431+ client = MongoClient(
432+ " mongodb://localhost:27017?tls=true&tlsAllowInvalidCertificates=true"
433+ )
434+ ```
435+ Another way of doing this would be to pass these options in as parameters to the MongoClient, like so:
436+ ``` python
437+ client = MongoClient(
438+ " mongodb://localhost:27017" , tls = True , tlsAllowInvalidCertificates = True
439+ )
440+ ```
You can’t perform that action at this time.
0 commit comments