bookmyservice-ums / app /core /nosql_client.py
MukeshKapoor25's picture
Add initial implementation of User Management Service
b407a42
raw
history blame
308 Bytes
import logging
from motor.motor_asyncio import AsyncIOMotorClient
from app.core.config import settings
logger = logging.getLogger(__name__)
mongo_client = AsyncIOMotorClient(settings.MONGO_URI)
db = mongo_client[settings.DB_NAME]
async def get_mongo_client() -> AsyncIOMotorClient:
return mongo_client