File size: 374 Bytes
67a1a5e
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
from pymongo import MongoClient

# MongoDB URI with actual credentials
CONNECTION_STRING = "mongodb+srv://transpolymer:transpolymer365@cluster0.2ojpls3.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0"

# Function to get the database
def get_database():
    client = MongoClient(CONNECTION_STRING)
    return client["transpolymerDB"]  # Your database name