import uuid
import pymongo
import getpass

config = {
	"username": "admin",
	"password": "pass",
	"server": "localhost:27017",
}
connector = "mongodb://{}:{}@{}".format(config["username"],config["password"], config["server"])
client = pymongo.MongoClient(connector)
db = client["groclist"]


username = input("Username :")
#password = getpass.getpass("Password: ")

userid = db.user_cred.find_one({"username": username}, {"uuid":1, "_id":0})
email = db.user_info.find_one(userid ,{"name": 1, "email": 1, "_id":0})

print (email)
