操作mongodb_python

  连接mongodb:

client=pymongo.MongoClient(host,port)

db=client['spz']

collection=db['stu_info']

collection.insert({})

collection.find({'k','v'})

collection.delete({})

collection.update({'sex':'nav'},{})

原文地址:https://www.cnblogs.com/pengwa1226/p/9363825.html