import pymongo client = pymongo.MongoClient('mongodb://{}:{}@{}:{}'.format('root', 'RYIHrqml#LSW6#!*', '116.63.130.34', 27020)) def find_user_info(param): """ 查询用户信息 Parameters: param: 查询条件 Returns: record: 记录 """ collection = client['用户']['用户信息'] data = collection.find(param, {'_id': False}) record = list(data) return record