Skip to content

Commit b29d1ba

Browse files
committed
update contributing
1 parent efe494d commit b29d1ba

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

CONTRIBUTING.md

+18
Original file line numberDiff line numberDiff line change
@@ -420,3 +420,21 @@ partially-converted asynchronous version of the same name to the `test/asynchron
420420
Use this generated file as a starting point for the completed conversion.
421421

422422
The 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+
```

0 commit comments

Comments
 (0)