Automated deployment: Sun Oct 27 15:36:14 UTC 2019 ab0b187f20133753797ed55cf4b9b11b65c9ec8d

This commit is contained in:
frankie567
2019-10-27 15:36:14 +00:00
parent 1ff69252cf
commit 746184154c
9 changed files with 240 additions and 19 deletions

14
src/db_mongodb.py Normal file
View File

@ -0,0 +1,14 @@
import motor.motor_asyncio
from fastapi import FastAPI
from fastapi_users.db import MongoDBUserDatabase
DATABASE_URL = "mongodb://localhost:27017"
client = motor.motor_asyncio.AsyncIOMotorClient(DATABASE_URL)
db = client["database_name"]
collection = db["users"]
app = FastAPI()
user_db = MongoDBUserDatabase(collection)