Guest User

Untitled

a guest
May 1st, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. from pymongo import MongoClient
  2. import os
  3. import urllib
  4.  
  5. username = urllib.quote_plus(os.environ.get('MONGO_USER'))
  6. password = urllib.quote_plus(os.environ.get('MONGO_PASSWORD'))
  7. client = MongoClient('mongodb://%s:%s@your-host-address-here:27017' % (username,password))
Add Comment
Please, Sign In to add comment