feat: initial import
This commit is contained in:
commit
0f9c0d93d9
22 changed files with 3563 additions and 0 deletions
24
src/main.py
Normal file
24
src/main.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
from contextlib import asynccontextmanager
|
||||
from typing import AsyncGenerator
|
||||
|
||||
from fastapi import FastAPI
|
||||
|
||||
from src.config import app_configs
|
||||
from src.snapshots.router import router as snapshots_router
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(_application: FastAPI) -> AsyncGenerator:
|
||||
# Startup
|
||||
yield
|
||||
# Shutdown
|
||||
|
||||
|
||||
app = FastAPI(**app_configs, lifespan=lifespan)
|
||||
|
||||
app.include_router(snapshots_router)
|
||||
|
||||
|
||||
@app.get("/healthcheck", include_in_schema=False)
|
||||
async def healthcheck() -> dict[str, str]:
|
||||
return {"status": "ok"}
|
||||
Loading…
Add table
Add a link
Reference in a new issue