def get_connection_string(): username = 'upload' password = 'quackquack' s = ("mongodb://:@dt0-shard-00-00-npkyt.mongodb.net:27017," "dt0-shard-00-01-npkyt.mongodb.net:27017,dt0-shard-00-02-npkyt.mongodb.net" ":27017/test?ssl=true&replicaSet=dt0-shard-0&authSource=admin") s = s.replace("", password) s = s.replace("", username) return s