File size: 412 Bytes
b29925a
 
d92c3eb
b29925a
88e4026
b29925a
88e4026
 
b29925a
88e4026
 
 
 
6dd577f
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import certifi
from motor.motor_asyncio import AsyncIOMotorClient
from core.config import MONGO_URI

# Create MongoDB client with TLS certificate
client = AsyncIOMotorClient(MONGO_URI, tls=True, tlsCAFile=certifi.where())

# Access main database
db = client["cps_db"]

# Collections
users_collection = db["users"]
patients_collection = db["patients"]
appointments_collection = db.get_collection("appointments")