pymongo
from pymongo import MongoClient # 连接数据库 client = MongoClient("mongodb://" + self.username + ":" + self.password + "@" + self.host + ":" + self.port) # 连接集合 collection = client.xinyongfei_rcs.bairongLog # 单条查询 collection.find({"id_card_number":"1525257155", "mobile":52525})