-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
32 lines (25 loc) · 780 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from fastapi import FastAPI
from routers import chapter_route, translations_route
from database import models
from database.db import engine
app = FastAPI()
app.include_router(chapter_route.router)
app.include_router(translations_route.router)
# app.include_router(user_route.router)
@app.get("/")
async def root():
return {
"message": "Jai Shree Ram!",
"docs": "/docs",
'chapters_available': '1, 2, 3',
"enpoints-available": {
'chapter': [
'/chapters',
'/chapters/{chapter_number}',
'/chapters/{chapter_number}/verses',
'/chapters/{chapter_number}/verses/{verse_number}'
]
}
}
# create all tables
models.Base.metadata.create_all(engine)