15 lines
265 B
Python
15 lines
265 B
Python
from motor.motor_asyncio import AsyncIOMotorClient, AsyncIOMotorDatabase
|
|
|
|
from core.config import settings
|
|
|
|
|
|
class DataBase:
|
|
client: AsyncIOMotorClient = None
|
|
|
|
|
|
db = DataBase()
|
|
|
|
|
|
def get_database() -> AsyncIOMotorDatabase:
|
|
return db.client[settings.MDB_DB]
|