Did I find the right examples for you? yes no

All Samples(15)  |  Call(5)  |  Derive(0)  |  Import(10)
Connection to a MongoDB replica set.
    

src/m/t/mtools-1.1.4/mtools/mlaunch/mlaunch.py   mtools(Download)
    except ImportError:
        from pymongo import Connection
        from pymongo import ReplicaSetConnection
    from pymongo.errors import ConnectionFailure, AutoReconnect, OperationFailure, ConfigurationError
except ImportError:
 
                try:
                    mrsc = ReplicaSetConnection( ','.join( 'localhost:%i'%i for i in port_range ), replicaSet=rs_name )
                    # primary, secondaries, arbiters
                    if mrsc.primary:

src/m/t/mtools-HEAD/mtools/mlaunch/mlaunch.py   mtools(Download)
    except ImportError:
        from pymongo import Connection
        from pymongo import ReplicaSetConnection
    from pymongo.errors import ConnectionFailure, AutoReconnect, OperationFailure, ConfigurationError
except ImportError:
 
                try:
                    mrsc = ReplicaSetConnection( ','.join( 'localhost:%i'%i for i in port_range ), replicaSet=rs_name )
                    # primary, secondaries, arbiters
                    if mrsc.primary:

src/p/i/picomongo-HEAD/picomongo/connection_manager.py   picomongo(Download)
 
from pymongo import Connection
from pymongo import ReplicaSetConnection
from pymongo.read_preferences import ReadPreference
 
    def _get_connection(connection_uri):
        if 'replicaSet=' in connection_uri:
            con = ReplicaSetConnection(connection_uri, read_preference=ReadPreference.PRIMARY_PREFERRED)
        else:
            con = Connection(connection_uri)

src/b/i/bitcoinquery-HEAD/bitcoinquery/util/mongodb.py   bitcoinquery(Download)
    if replica_set:
        conn = pymongo.ReplicaSetConnection(
            host,
            replicaSet=replica_set,
        )

src/m/o/mongo-rs-api-HEAD/main.py   mongo-rs-api(Download)
import sys, time, random
 
# Import pymongo
sys.path.insert(0, 'mongo-python-driver')
from pymongo import ReplicaSetConnection
 
                    try:
                        c = ReplicaSetConnection(rs_uri, replicaSet=rs_name)
                    except:
                        pass

src/s/i/Simon-0.7.0/simon/connection.py   Simon(Download)
    from pymongo import MongoClient, MongoReplicaSetClient
except ImportError:
    from pymongo import (Connection as MongoClient,
                         ReplicaSetConnection as MongoReplicaSetClient,
                         version)

src/s/i/Simon-HEAD/simon/connection.py   Simon(Download)
    from pymongo import MongoClient, MongoReplicaSetClient
except ImportError:
    from pymongo import (Connection as MongoClient,
                         ReplicaSetConnection as MongoReplicaSetClient,
                         version)

src/m/o/mongoengine-HEAD/mongoengine/connection.py   mongoengine(Download)
import pymongo
from pymongo import Connection, ReplicaSetConnection, uri_parser
 
 
__all__ = ['ConnectionError', 'connect', 'register_connection',

src/p/i/picomongo-0.6/picomongo/connection_manager.py   picomongo(Download)
from pymongo import Connection
try:
    from pymongo import ReplicaSetConnection
except ImportError:
    ReplicaSetConnection = Connection

src/m/o/mongoengine-HEAD/tests/test_replicaset_connection.py   mongoengine(Download)
import unittest
 
import pymongo
from pymongo import ReadPreference, ReplicaSetConnection
 

  1 | 2  Next