server_description
– An object representation of a server the driver is connected to.
class pymongo.server_description.ServerDescription
Immutable representation of one server.
Parameters
address: A (host, port) pair
ismaster: Optional Hello instance
round_trip_time: Optional float
Warning
The ismaster parameter will be renamed to hello in PyMongo 4.0.
-
The address (host, port) of this server.
property all_hosts
List of hosts, passives, and arbiters known to this server.
property error
The last error attempting to connect to the server, or None.
property primary
This server’s opinion about who the primary is, or None.
-
Checks if this server supports retryable writes.
property retryable_writes_supported
Checks if this server supports retryable writes.
property round_trip_time
The current average latency or None.
property server_type
The type of this server.