Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は pymongo を使用していますが、「show dbs」に相当する mongodb インタラクティブ シェルを実行する方法がわかりません。
from pymongo import MongoClient # Assuming youre running mongod on 'localhost' with port 27017 c = MongoClient('localhost',27017) c.database_names()
2020年の更新:
DeprecationWarning:database_namesは非推奨です
以下を使用してください。
c.list_database_names()