Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions source/administration/ssl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,21 @@ PyMongo
~~~~~~~

Add the "``ssl=True``" parameter to a PyMongo
py:module:`connection <pymongo:pymongo.connection>`
py:module:`MongoClient <pymongo:pymongo.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:

Expand Down