mongo_suppor_1.py 433 B

123456789101112
  1. def get_connection_string():
  2. username = 'upload'
  3. password = 'quackquack'
  4. s = ("mongodb://<USERNAME>:<PASSWORD>@dt0-shard-00-00-npkyt.mongodb.net:27017,"
  5. "dt0-shard-00-01-npkyt.mongodb.net:27017,dt0-shard-00-02-npkyt.mongodb.net"
  6. ":27017/test?ssl=true&replicaSet=dt0-shard-0&authSource=admin")
  7. s = s.replace("<PASSWORD>", password)
  8. s = s.replace("<USERNAME>", username)
  9. return s