Skip to content

Commit 979f806

Browse files
authored
Merge pull request #1 from sumaro2101/develop
Develop
2 parents 7a8357f + ca00591 commit 979f806

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

api_v1/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .routers import router
2+
3+
__all__ = ('router',)

api_v1/routers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from fastapi import APIRouter
2+
3+
4+
router = APIRouter(prefix='/api/v1')

main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from contextlib import asynccontextmanager
22
from fastapi import FastAPI
33
from config import db_connection, BaseModel
4+
from api_v1 import router
45

56

67
@asynccontextmanager
@@ -12,3 +13,4 @@ async def lifespan(app: FastAPI):
1213

1314

1415
app = FastAPI(lifespan=lifespan)
16+
app.include_router(router=router)

0 commit comments

Comments
 (0)