python操作mongodb数据库

from pymongo import MongoClient


client=MongoClient("mongodb://root:password@ip:27017")

dblist = client.list_database_names()


语句查看数据表内的记录数
db.getCollection('resObject').find().count();
原文地址:https://www.cnblogs.com/slqt/p/11002478.html