PyMongo 2.4 up to at least 3.11.4
from pymongo import MongoClient
client = MongoClient('<HOST>', <PORT>)
client.drop_database('<DBNAME>')
-
PyMongo Stable documentation
-
PyMongo 3.2.1 documentation
PyMongo 2.3 and earlier
from pymongo import Connection
connection = Connection('<HOST>', <PORT>)
connection.drop_database('<DBNAME>')
-
PyMongo 2.3 documentation
-
PyMongo 1.0 documentation