login #1

Merged
v4l3n71n merged 10 commits from login into master 2023-10-12 21:57:27 +00:00
5 changed files with 25 additions and 1 deletions
Showing only changes of commit e28520a5fb - Show all commits

View File

@ -0,0 +1,11 @@
from fastapi import FastAPI
from .routers import users
app = FastAPI()
app.include_router(users.router)
@app.get("/")
async def root():
return {"message": "Hello World !"}

0
app/models/__init__.py Normal file
View File

12
app/models/users.py Normal file
View File

@ -0,0 +1,12 @@
from pydantic import BaseModel
from pydantic_mongo import AbstractRepository, ObjectIdField
class Users(BaseModel):
id: ObjectIdField = None
username: str
class UsersRepository(AbstractRepository[Users]):
class Meta:
collection_name = users

0
app/routers/__init__.py Normal file
View File

View File

@ -1,2 +1,3 @@
fastapi
uvicorn[standard]
pydantic-mongo