操作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'},{})

猜你喜欢

转载自www.cnblogs.com/pengwa1226/p/9363825.html
今日推荐