Initialize dev environment
This commit is contained in:
1
app/__init__.py
Normal file
1
app/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from app.routers import users
|
||||
0
app/dependencies.py
Normal file
0
app/dependencies.py
Normal file
0
app/internal/__init__.py
Normal file
0
app/internal/__init__.py
Normal file
0
app/internal/admin.py
Normal file
0
app/internal/admin.py
Normal file
11
app/main.py
Normal file
11
app/main.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from fastapi import FastAPI
|
||||
|
||||
from app.routers import users
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
app.include_router(users.router)
|
||||
|
||||
@app.get("/")
|
||||
async def root():
|
||||
return {"message": "Hello, World!"}
|
||||
1
app/models/user.py
Normal file
1
app/models/user.py
Normal file
@@ -0,0 +1 @@
|
||||
from sqlmodel import Field, SQLModel
|
||||
0
app/routers/__init__.py
Normal file
0
app/routers/__init__.py
Normal file
7
app/routers/users.py
Normal file
7
app/routers/users.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter(prefix="/users", tags=["users"])
|
||||
|
||||
@router.get("/")
|
||||
async def get_users():
|
||||
return {"message": "List of users"}
|
||||
Reference in New Issue
Block a user