pymongo 基本的操作

open db

collection=pymongo.Connection('localhost',27017).job.list

 

insert data

collections.insert(document)


Update
from
bson.objectid importObjectId
collection.update("_id":ObjectId('fwefewf34234'),{"$set":{'lastTime':'12}})

 

转载于:https://www.cnblogs.com/epirus/p/3416588.html

你可能感兴趣的:(pymongo 基本的操作)