server_description – An object representation of a server the driver is connected to.¶
Represent one server the driver is connected to.
- class pymongo.server_description.ServerDescription¶
Immutable representation of one server.
address: A (host, port) pair
hello: Optional Hello instance
round_trip_time: Optional float
error: Optional, the last error attempting to connect to the server
- property all_hosts: Set[Tuple[str, int]]¶
List of hosts, passives, and arbiters known to this server.
- property primary: Optional[Tuple[str, int]]¶
This server’s opinion about who the primary is, or None.