File size: 492 Bytes
f1495be
 
 
 
 
8716ca3
f1495be
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import pymongo
import gridfs


# Connect to MongoDB with the custom SSL context
client = pymongo.MongoClient("mongodb+srv://soham:[email protected]/?retryWrites=true&w=majority&appName=potholeDetection", ssl=True)

db = client.database

# Define collections
admin_collection = db.admin_users
user_collection = db.normal_users
notification_collection = db.notifications
pothole_image_collection = db.pothole_images
fs = gridfs.GridFS(db)  # Initialize GridFS bucket