I'm working on an API which requires the primary node's name from an mongodb replia set.
Is there a way to get the name and ip of primary/master node in a replicaset using the pymongo API?
Or generally any way i could get that info from a python program?