Data Engineering, Data Science, Mongodb, Python, DevOps.
following command: from pymongo import MongoClient # Connecting to the master as a read and write primary node master_client = MongoClient("mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.10.5&readPreference=primary") # Connect to worker1 as a