Created
April 8, 2015 17:30
-
-
Save danared/f69030bd2daa0ee1fd27 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> # Connect to one standalone, mongos, or replica set member. | |
| >>> client = MongoClient(‘mongodb://server’) | |
| >>> | |
| >>> # Connect to a replica set. | |
| >>> client = MongoClient( | |
| ... ‘mongodb://member1,member2/?replicaSet=my_rs’) | |
| >>> | |
| >>> # Load-balance among mongoses. | |
| >>> client = MongoClient(‘mongodb://mongos1,mongos2’) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment