Created
April 4, 2017 03:35
-
-
Save arischow/7fd2ca48e50b0cafdb955785a412ada8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dropping a database via pymongo | |
from pymongo import Connection | |
client = MongoClient() # default host localhost, port 27017 | |
client.drop_database('mydatabase') | |
# drop a collection via pymongo | |
from pymongo import Connection | |
client = MongoClient() | |
client['mydatabase'].drop_collection('mycollection') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment