from pymongo import MongoClient
client = MongoClient('mongodb://localhost:27017/')
db = client.test_database
coll= db.test_collection
用coll.insert() 插数据进
mongodb面建库test_database,并建collection名字叫test_collection
用法错了,应该是这样子>>>import pymongo
>>>client = pymongo.MongoClient("localhost", 27017)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)