diff --git a/source/administration/ssl.txt b/source/administration/ssl.txt index a3056bbf1b2..ea2fd526ea9 100644 --- a/source/administration/ssl.txt +++ b/source/administration/ssl.txt @@ -108,21 +108,21 @@ PyMongo ~~~~~~~ Add the "``ssl=True``" parameter to a PyMongo -py:module:`connection ` +py:module:`MongoClient ` to create a MongoDB connection to an SSL MongoDB instance: .. code-block:: python - from pymongo import Connection - c = Connection(host="mongodb.example.net", port=27017, ssl=True) + from pymongo import MongoClient + c = MongoClient(host="mongodb.example.net", port=27017, ssl=True) To connect to a replica set, use the following operation: .. code-block:: python - from pymongo import ReplicaSetConnection - c = ReplicaSetConnection("mongodb.example.net:27017", - replicaSet="mysetname", ssl=True) + from pymongo import MongoReplicaSetClient + c = MongoReplicaSetClient("mongodb.example.net:27017", + replicaSet="mysetname", ssl=True) PyMongo also supports an "``ssl=true``" option for the MongoDB URI: