10 lines
213 B
Python
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
|
|
|