From b6361e4cec6b5d5af4b1bc70476bb1a95731a334 Mon Sep 17 00:00:00 2001 From: elitan Date: Thu, 20 Oct 2016 18:56:42 +0200 Subject: [PATCH] added import for MongoClient --- doc/examples/authentication.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/examples/authentication.rst b/doc/examples/authentication.rst index 2909a1ff13..b424e42305 100644 --- a/doc/examples/authentication.rst +++ b/doc/examples/authentication.rst @@ -12,6 +12,7 @@ If your username or password contains special characters (e.g. '/', ' ', or '@') you must ``%xx`` escape them for use in the MongoDB URI. PyMongo uses :meth:`~urllib.unquote_plus` to decode them. For example:: + >>> from pymongo import MongoClient >>> import urllib >>> password = urllib.quote_plus('pass/word') >>> password