File size: 446 Bytes
86b135a
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
from motor.motor_asyncio import AsyncIOMotorClient
from urllib.parse import quote_plus

username = "pujanneupaneop0907"
password = "Pujan@1234"  # your actual password
password_encoded = quote_plus(password)

MONGO_URI = f"mongodb+srv://{username}:{password_encoded}@cluster0.5kuhtss.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0"

client = AsyncIOMotorClient(MONGO_URI)
db = client["your_database_name"]  # Replace with your DB name