(self,
                 seeds=None,
                 replica_set_name=None,
                 pool_class=None,
                 pool_options=None,
                 monitor_class=None,
                 condition_class=None,
                 local_threshold_ms=LOCAL_THRESHOLD_MS,
                 server_selection_timeout=SERVER_SELECTION_TIMEOUT,
                 heartbeat_frequency=common.HEARTBEAT_FREQUENCY)
Represent MongoClient's configuration.

        Take a list of (host, port) pairs and optional replica set name.
Represent MongoClient's configuration.
Represent MongoClient s configuration .
def __init__(self,
                 seeds=None,
                 replica_set_name=None,
                 pool_class=None,
                 pool_options=None,
                 monitor_class=None,
                 condition_class=None,
                 local_threshold_ms=LOCAL_THRESHOLD_MS,
                 server_selection_timeout=SERVER_SELECTION_TIMEOUT,
                 heartbeat_frequency=common.HEARTBEAT_FREQUENCY):
        """Represent MongoClient's configuration.

        Take a list of (host, port) pairs and optional replica set name.
        """
        if heartbeat_frequency < common.MIN_HEARTBEAT_INTERVAL:
            raise ConfigurationError(
                "heartbeatFrequencyMS cannot be less than %d" %
                common.MIN_HEARTBEAT_INTERVAL * 1000)

        self._seeds = seeds or [('localhost', 27017)]
        self._replica_set_name = replica_set_name
        self._pool_class = pool_class or pool.Pool
        self._pool_options = pool_options or PoolOptions()
        self._monitor_class = monitor_class or monitor.Monitor
        self._condition_class = condition_class or threading.Condition
        self._local_threshold_ms = local_threshold_ms
        self._server_selection_timeout = server_selection_timeout
        self._heartbeat_frequency = heartbeat_frequency
        self._direct = (len(self._seeds) == 1 and not replica_set_name)
        self._topology_id = ObjectId()
def __init__ ( self , seeds = None , replica_set_name = None , pool_class = None , pool_options = None , monitor_class = None , condition_class = None , local_threshold_ms = LOCAL_THRESHOLD_MS , server_selection_timeout = SERVER_SELECTION_TIMEOUT , heartbeat_frequency = common . HEARTBEAT_FREQUENCY ) : if heartbeat_frequency < common . MIN_HEARTBEAT_INTERVAL : raise ConfigurationError ( "heartbeatFrequencyMS cannot be less than %d" % common . MIN_HEARTBEAT_INTERVAL * 1000 ) self . _seeds = seeds or [ ( 'localhost' , 27017 ) ] self . _replica_set_name = replica_set_name self . _pool_class = pool_class or pool . Pool self . _pool_options = pool_options or PoolOptions ( ) self . _monitor_class = monitor_class or monitor . Monitor self . _condition_class = condition_class or threading . Condition self . _local_threshold_ms = local_threshold_ms self . _server_selection_timeout = server_selection_timeout self . _heartbeat_frequency = heartbeat_frequency self . _direct = ( len ( self . _seeds ) == 1 and not replica_set_name ) self . _topology_id = ObjectId ( )