2020-04-21 11:09:13 +08:00

10 lines
213 B
Python

from pymongo import MongoClient
from bson import ObjectId, json_util
# 获取数据集
def col():
# 链接数据库
conn = MongoClient('mongodb://pb:wO0pM5rD9eP3@mongo:27017/pb')
return conn.pb.user