Skip to content

MongoClient instead of Connection class #628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 11, 2013
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