14 lines
348 B
Python
14 lines
348 B
Python
import os
|
|
|
|
import motor.motor_asyncio
|
|
from beanie import Document
|
|
from fastapi_users.db import BaseOAuthAccount, BeanieBaseUser, BeanieUserDatabase
|
|
from pydantic import Field
|
|
|
|
DATABASE_URL = "mongodb://localhost:27017"
|
|
client = motor.motor_asyncio.AsyncIOMotorClient(
|
|
DATABASE_URL, uuidRepresentation="standard"
|
|
)
|
|
db = client["database_name"]
|
|
|