详细命令及说明,点击官网指南;
常用命令
包引入1
2
3
4import pymongo
from pymongo import MongoClient
from bson.objectid import ObjectId
连接
1 | client= MongoClient('localhost',27017) |
详细命令及说明,点击官网指南;
包引入1
2
3
4import pymongo
from pymongo import MongoClient
# 使用 ID 查找需要 ObjectID
from bson.objectid import ObjectId
1 | client= MongoClient('localhost',27017) |