什么?studio3T试用期到了,还没有破解的办法?试制基于python的mongodb CRUD平台
首先,安装python支持的mongodb库pip install pymongo
from pymongo import MongoClient client = MongoClient('localhost',27017)
#获取所有数据库 dblist = client.list_database_names() print("数据库列表:",dblist) choosedb = client['olddream']
#获取选定数据库的所有集合 collections = choosedb.list_collection_names() print("选定数据库的集合列表:",collections)