auto flush databases

This commit is contained in:
Jonas Braus
2024-12-12 13:21:43 +01:00
parent 948210d73c
commit ed5090110c
4 changed files with 33 additions and 2 deletions
+7
View File
@@ -0,0 +1,7 @@
import pymongo
def flush_mongo():
client = pymongo.MongoClient('mongodb://python:PasswordPassword123@localhost:27017/')
mongodb = client['document_table']
mongodb.drop_collection("documents")
client.close()